//BlockadeRunner_A state Base { Conditions { } Actions { CnxController "from=door1_a" "to=door1_b" "off_flag=BLOCK" "obj=lever_door" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door2_a" "to=door2_b" "off_flag=BLOCK" "obj=door_01" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door3_a" "to=door3_b" "off_flag=BLOCK" "obj=door_03" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door4_a" "to=door4_b" "on_flag=BLOCK" "obj=dark_door_1_1" "checkvisible" "on_frames=1TOlastframe" "bothways" AddLocatorGroup "name=Goody1" AddLocatorGroup "name=Goody2" AddLocatorGroup "name=Goody3" AddLocatorGroup "name=Baddy1" AddLocatorGroup "name=Baddy2" AddLocatorGroup "name=Baddy3" SetState "Update" } } state Update { Conditions { if Message "PhaseA" == 0 and if ObstacleAtStart "lever_door" == 0 goto SetPhase1 ;if EitherPlayerInTriggerArea "Area1" == 1 goto SetPhase1 if Message "PhaseA" == 1 and if EitherPlayerInTriggerArea "Area2" == 1 goto SetPhase2 if Message "PhaseA" == 2 and if IsSetAlive "2" == 0 goto SetPhase3 if Message "PhaseA" == 3 and if IsSetAlive "2" == 0 goto SetPhase4 if Message "PhaseA" == 4 and if IsSetAlive "2" == 0 goto SetPhase5 if Message "PhaseA" == 5 goto SetPhase5 } Actions { } } state SetPhase1 { Conditions { } Actions { SetMessage "name=PhaseA" "value=1" SetScriptState "set=1" "state=StartPhase1" //Goodies SetState "Update" } } state SetPhase2 { Conditions { ;if ObstacleFinished "main_door" == 1 goto ReallySetPhase_2 if ForceComplete "main_door_pop3" == 1 goto ReallySetPhase_2 } Actions { PlayObstacle "name=main_door" } } state ReallySetPhase_2 { Conditions { } Actions { SetMessage "name=PhaseA" "value=2" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_3" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_4" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" SetScriptState "set=2" "state=StartPhase1" //Baddies SetState "Update" } } state SetPhase3 { Conditions { } Actions { SetMessage "name=PhaseA" "value=3" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_3" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_4" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" SetScriptState "set=1" "state=StartPhase2" //Goodies SetScriptState "set=2" "state=StartPhase2" //Baddies SetState "Update" } } state SetPhase4 { Conditions { } Actions { SetMessage "name=PhaseA" "value=4" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_3" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" CreateCreatures "locator=spawn_4" "type=stormtrooper" "script=Wave_Trooper" "addtoset=2" SetScriptState "set=1" "state=StartPhase3" //Goodies SetScriptState "set=2" "state=StartPhase3" //Baddies SetState "Update" } } state SetPhase5 { Conditions { } Actions { SetMessage "name=PhaseA" "value=5" SetObstacleVisbility "main_door_smoke" "FALSE" SetScriptState "set=1" "state=StartPhase4" //Goodies SetState "Update" } }