//EndorBattle D //Sets // 1: AirLock // 2: Final Spawn state Base { Conditions { if AlwaysTrue == 1 goto Update } Actions { //zip up bridge CnxController "from=door_1a_a" "to=door_1a_b" "off_flag=BLOCK" "obj=door_1a" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=doorl_a" "to=doorl_b" "off_flag=BLOCK" "obj=doorl_a" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=doorr_a" "to=doorr_b" "off_flag=BLOCK" "obj=doorr_a" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" //Lift Cnx Controllers CnxController "from=lift_down" "to=lift_0" "off_flag=BLOCK" "obj=lift01" "checkvisible" "on_frames=1TO20" "bothways" CnxController "from=lift_up" "to=lift_1" "off_flag=BLOCK" "obj=lift01" "checkvisible" "on_frames=40TO60" "bothways" CnxController "from=bridge_a" "to=lift_1" "off_flag=BLOCK" "obj=lift01" "checkvisible" "on_frames=40TO60" "bothways" CnxController "from=ramp_down" "to=ramp_up" "off_flag=BLOCK" "obj=slopeplat_01b" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=bridge_a" "to=bridge_b" "off_flag=BLOCK" "obj=bridge1_14_end" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=final_a" "to=final_b" "on_flag=BLOCK" "obj=endffield_01a" "checkvisible" "on_frames=1TOlastframe-1" "bothways" //Under the floor lift CnxController "from=lift2_bottom" "to=lift2_middlea" "off_flag=BLOCK" "obj=lift02" "checkvisible" "on_frames=0TO5" "bothways" CnxController "from=lift2_middleb" "to=lift2_top" "off_flag=BLOCK" "obj=lift02" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" SetMessage "name=FinalCount" "value=20" AddLocatorGroup "name=WanderPhone" AddLocatorGroup "name=Final" AddLocatorGroup "name=Final_Run" } } //Base state Update { Conditions { if Timer > 20 and if EitherPlayerInTriggerArea "Airlock_A" == 1 and if NumInSetAlive "1" < 3 goto SpawnAirLock if EitherPlayerInTriggerArea "Final_Area" == 1 goto StartFinal } Actions { ResetTimer "mintime=0" "maxtime=10" } } state SpawnAirLock { Conditions { } Actions { CreateCreatures "locator=spawn" "groupsize=4" "type=scouttrooper" "script=SpawnAttack" "addtoset=1" SetState "Update" } } state StartFinal { Conditions { if Message "FinalCount" > 0 and if NumInSetAlive "2" < 6 goto SpawnFinal if Message "FinalCount" == 0 goto EndFinal } Actions { } } state SpawnFinal { Conditions { } Actions { CreateCreatures "locator_group=final" "type=scouttrooper" "script=Final_Storm" "addtoset=2" "off_screen" SetMessage "name=FinalCount" "decrement=1" SetState StartFinal } } state EndFinal { Conditions { } Actions { } }