//E4CharacterBonus_A //Spawning creatures state Base { Conditions { } Actions { SetPathCnxFlag "from=gen_door_6b" "to=gen_door_6_a" "BLOCK" CnxController "from=gen_door_6a" "to=gen_door_6b" "off_flag=BLOCK" "obj=gen_door_6door_a" "checkvisible" "on_frames=lastframeTOlastframe" SetState "Update" } } state Update { Conditions { if TurretAlive "lift_1_cam" == 0 goto NormalDoor if Timer > 1 and if NumBaddiesThatCanSeePlayers < 4 and if EitherPlayerInTriggerArea "Lift_Area_1" == 1 goto OpenLift } Actions { LockDoor "gen_door6" ResetTimer } } state OpenLift { Conditions { if TurretAlive "lift_1_cam" == 0 goto NormalDoor if DoorClosed "gen_door6" == 1 goto LiftDeparting } Actions { CreateCreatures "locator=lift_1" "type=stormtrooper" "script=SpawnAttack" "mingroupsize=1" "maxgroupsize=2" "nacross=2" "xspacing=0.1" "zspacing=0.1" UnLockDoor "gen_door6" OpenDoor "gen_door6" } } state LiftDeparting { Conditions { if TurretAlive "lift_1_cam" == 0 goto NormalDoor } Actions { LockDoor "gen_door6" SetState "Update" } } state NormalDoor { Conditions { } Actions { UnLockDoor "gen_door6" } }