//DeathStarEscape_B //Sets: // 1: Lift Storm troopers state Base { Conditions { if Message "B_Init" == 0 goto Init if Message "B_Init" == 1 goto Update } Actions { CnxController "from=door1_a" "to=door1_b" "off_flag=BLOCK" "obj=door_2_r_1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door2_a" "to=door2_b" "off_flag=BLOCK" "obj=door_2_r_2" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door3_a" "to=door3_b" "off_flag=BLOCK" "obj=door_2_r_3" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" SetPathCnxFlag "from=lift_r" "to=lift_a" "NO_DESTINATION_CHECK" SetPathCnxFlag "from=lift_r" "to=lift_a" "JUMP" "bothways" CnxController "from=lift_r" "to=lift_a" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=0TO35" "on_frames=210TOlastframe" CnxController "from=lift_a" "to=lift_r" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=0TO10" "on_frames=220TOlastframe" SetPathCnxFlag "from=lift_l" "to=lift_b" "NO_DESTINATION_CHECK" SetPathCnxFlag "from=lift_l" "to=lift_b" "JUMP" "bothways" CnxController "from=lift_l" "to=lift_b" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=60TO190" CnxController "from=lift_b" "to=lift_l" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=0TO60" "on_frames=190TOlastframe" SetPathCnxFlag "from=lift_r "to=lift_c" "NO_DESTINATION_CHECK" SetPathCnxFlag "from=lift_r" "to=lift_c" "JUMP" "bothways" CnxController "from=lift_r" "to=lift_c" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=70TO90" "on_frames=160TO180" CnxController "from=lift_c" "to=lift_r" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=0TO70" "on_frames=180TOlastframe" SetPathCnxFlag "from=lift_r" "to=lift_d" "NO_DESTINATION_CHECK" SetPathCnxFlag "from=lift_r" "to=lift_d" "JUMP" "bothways" CnxController "from=lift_r" "to=lift_d" "off_flag=DONT_JUMP_NOW" "off_flag=BLOCK" "on_flag=JUMP_NOW" "fakeanimid=0" "on_frames=115TO135" SetPathCnxFlag "from=lift_d" "to=lift_r" "JUMP_NOW" CnxController "from=topdoor_a" "to=topdoor_b" "off_flag=BLOCK" "obj=storm_door_2" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" //Going from left -> right CnxController "from=moving_l" "to=moving_c_l" "off_flag=DONT_JUMP_NOW" "on_flag=JUMP_NOW" "obj=gap" "checkvisible" "on_frames=45TO60" CnxController "from=premove_l" "to=moving_l" "off_flag=BLOCK""obj=gap" "checkvisible" "on_frames=45TO60" CnxController "from=moving_c_r" "to=moving_r" "off_flag=DONT_JUMP_NOW" "on_flag=JUMP_NOW" "obj=gap" "checkvisible" "on_frames=60TOlastframe" //Going from right -> left CnxController "from=moving_r" "to=moving_c_r" "off_flag=DONT_JUMP_NOW" "on_flag=JUMP_NOW" "obj=gap" "checkvisible" "on_frames=60TO90" CnxController "from=premove_r" "to=moving_r" "off_flag=BLOCK" "obj=gap" "checkvisible" "on_frames=60TO90" CnxController "from=moving_c_l" "to=moving_l" "oXff_flag=DONT_JUMP_NOW" "on_flag=JUMP_NOW" "obj=gap" "checkvisible" "on_frames=1TOlastframe" ObstacleTriggerSet "trigger=gap_on_1" "trigger=gap_on_2" "trigger=gap_on_3" "obstacle=gap" } } state Init { Conditions { } Actions { SetMessage "name=liftSpawn" "value=25" SetMessage "name=B_Init" "value=1" SetState Update } } state Update { Conditions { if EitherPlayerInTriggerArea "LIFT_GRND" == 1 and if NumInSetAlive "1" < 6 and if Timer > 5 and if Message "liftSpawn" > 0 goto SpawnLiftGrnd if EitherPlayerInTriggerArea "LIFT_HAT" == 1 and if NumInSetAlive "1" < 6 and if Timer > 5 and if Message "liftSpawn" > 0 goto SpawnLiftHat if EitherPlayerInTriggerArea "LIFT_TOP" == 1 and if NumInSetAlive "1" < 6 and if Timer > 5 and if Message "liftSpawn" > 0 goto SpawnLiftTop } Actions { ResetTimer } } state SpawnLiftTop { Conditions { if Random < 0.2 goto SpawnLiftHat if PreviousResult < 0.4 goto SpawnLiftGrnd if AlwaysTrue == 1 goto Update } Actions { CreateCreatures "locator=spawn_top" "type=StormTrooper" "script=SpawnAttack" "addtoset=1" "dont_set_on_surface" "yoffset=5" "zipdown" SetMessage "name=liftSpawn" "decrement=1" } } state SpawnLiftHat { Conditions { if Random < 0.2 goto SpawnLiftTop if PreviousResult < 0.4 goto SpawnLiftGrnd if AlwaysTrue == 1 goto Update } Actions { CreateCreatures "locator=spawn_hat" "type=StormTrooper" "script=SpawnAttack" "addtoset=1" "dont_set_on_surface" "yoffset=5" "zipdown" SetMessage "name=liftSpawn" "decrement=1" } } state SpawnLiftGrnd { Conditions { if Random < 0.2 goto SpawnLiftHat if PreviousResult < 0.4 goto SpawnLiftTop if AlwaysTrue == 1 goto Update } Actions { CreateCreatures "locator=spawn_grnd" "type=StormTrooper" "script=SpawnAttack" "addtoset=1" "dont_set_on_surface" "yoffset=5" "zipdown" SetMessage "name=liftSpawn" "decrement=1" } }