//MosEisley_B state Base { Conditions { if MissionMode == 1 goto MissionMode if Message "BuiltATST" == 1 goto SpawnATSTtrooper if Message "BuiltATST" > 1 goto Finished if AlwaysTrue == 1 goto NotYetBuilt } Actions { } } state NotYetBuilt { Conditions { if Message "BuiltATST" == 2 goto Finished if Message "BuiltATST" == 1 goto SpawnATSTtrooper if ObstacleFinished "atst_end" == 1 goto CreateATST if Debug == 3 goto CreateATST } Actions { DeActivate "character=BuildItATST" DeActivate "character=ATSTtrooper" DeActivate "character=atst_1" } } state CreateATST { Conditions { } Actions { Idle "2" SetMessage "name=BuiltATST" "value=1" SetObstacleVisbility "atst_end2" "FALSE" Activate "character=BuildItATST" //Activate "character=ATSTtrooper" Activate "character=atst_1" SetState "SpawnATSTtrooper" } } state SpawnATSTtrooper { Conditions { if Message "BuiltATST" == 3 goto Finished //Cut scene completed if Message "BuiltATST" == 1 goto SpawnATSTtrooper //Killed before cut scene could end } Actions { SetMessage "name=BuiltATST" "value=2" CreateCreatures "locator=spawn" "type=SandTrooper" "script=ATSTtrooper" //SetScriptState "character=ATSTtrooper" "state=Start" } } state Finished { Conditions { } Actions { SetObstacleVisbility "atst_end2" "FALSE" } } state MissionMode { Conditions { } Actions { } }