state Base { Conditions { } Actions { SetState "Update" } } state Update { Conditions { //Puzzle 1 if ObstacleChainPhase "falcon" == 2 goto ResetPhase if ObstacleChainPhase "falcon" == 3 and if InMiniCut == 0 and if Timer > 2 and if NumInSetAlive "4" < 10 and if Message "FalconPhase" > 0 goto SpawnPhaseTroopers //Puzzle 2 if ObstacleChainPhase "falcon" == 4 goto ResetPhase if ObstacleChainPhase "falcon" == 5 and if InMiniCut == 0 and if Timer > 2 and if NumInSetAlive "4" < 10 and if Message "FalconPhase" > 0 goto SpawnPhaseTroopers //Puzzle 3 if ObstacleChainPhase "falcon" == 6 goto ResetPhase if ObstacleChainPhase "falcon" == 7 and if InMiniCut == 0 and if Timer > 2 and if NumInSetAlive "4" < 10 and if Message "FalconPhase" > 0 goto SpawnPhaseTroopers //Puzzle 4 if ObstacleChainPhase "falcon" == 8 goto ResetPhase if ObstacleChainPhase "falcon" == 9 and if InMiniCut == 0 and if Timer > 2 and if NumInSetAlive "4" < 10 and if Message "FalconPhase" > 0 goto SpawnPhaseTroopers //Done all the puzzles if ObstacleChainPhase "falcon" == 9 and if NumInSetAlive "4" == 0 and if Message "FalconPhase" < 1 goto OpenFalcon } Actions { ResetTimer } } state ResetPhase { Conditions { } Actions { SetMessage "name=FalconPhase" "value=25" SetState "Update" } } state SpawnPhaseTroopers { Conditions { } Actions { CreateCreatures "locator_group=hngr_phase" "type=StormTrooper" "script=HangarSpawn" "addtoset=4" "dont_set_on_surface" "yoffset=10" "zipdown" CreateCreatures "locator_group=hngr_phase" "type=StormTrooper" "script=HangarSpawn" "addtoset=4" "dont_set_on_surface" "yoffset=10" "zipdown" CreateCreatures "locator_group=hngr_phase" "type=StormTrooper" "script=HangarSpawn" "addtoset=4" "dont_set_on_surface" "yoffset=10" "zipdown" SetMessage "name=FalconPhase" "decrement=3" SetState "Update" } } state OpenFalcon { Conditions { } Actions { Idle "1" CameraCut "range=3" "roty=135" "rotx=15" "tgt_locator=camtgt" "FollowTgt" "blend_out_time=0.5" "end_time=3" "nXo_borders" Idle "1" PlayObstacle "name=Falcon_Ramp" } }