// When a zombie is blocked by a door and they are currently chasing a target // they will attempt to bash open the door. // However, they will ignore it if it's locked or cannot otherwise be opened. // If, during any point, the zombie gets attacked then it will stop bashing the door // and start moving towards the newest attacker. void main() { object oZombie = OBJECT_SELF; object oTarget = GetAttackTarget(oZombie); object oDoor = GetBlockingDoor(); int iType = GetObjectType(oDoor); int bLocked = GetLocked(oDoor); // if the door is locked, the zombie should give up. if(bLocked) { AssignCommand(oZombie, ClearAllActions()); } // Otherwise, blocking object must be a door, cannot be open and it cannot be locked. else if(iType == OBJECT_TYPE_DOOR && !bLocked && !GetIsOpen(oDoor)) { DoDoorAction(oDoor, DOOR_ACTION_BASH); } }