//ATAT script for Hoth Battle E state Base { Conditions { } Actions { SetViewDistance "50" SetMaxViewHeight "100" SetMinViewHeight "-100" DontPush SetState Update } } state Update { Conditions { //Do snaps if not arrived in time if Message "Wave" == 2 and if Message "Arrived" < 1 goto Snap1 if Message "Wave" == 4 and if InMiniCut == 0 and if OffScreenTimer > 1.3 and if Message "Arrived" < 3 goto Snap4 //If got to minicut and not arrived at the right pos if Message "Wave" == 3 and if Message "Arrived" < 3 goto Snap3 //Do this after snaps, so that it will appear in the minicut again if InTriggerArea "Melee" == 1 goto GotoLoc if Message "Arrived" == 0 goto GetLoc1 if Message "Arrived" == 1 and if Message "Wave" == 2 goto GetLoc2 if Message "Arrived" == 2 and if Message "Wave" == 2 goto GetLoc3 if Message "Arrived" == 3 and if Message "Wave" == 3 goto GetLoc4 iXf AlwaysTrue == 1 goto GetLoc4 } Actions { SetMesssage "name=Arrived" "value=0" } } state GetLoc1 { Conditions { //Do snaps if not arrived in time if Message "Wave" == 2 and if Message "Arrived" < 1 goto Snap1 if Message "Wave" == 4 and if InMiniCut == 0 and if OffScreenTimer > 1.2 and if Message "Arrived" < 3 goto Snap4 //If got to minicut and not arrived at the right pos if Message "Wave" == 3 and if Message "Arrived" < 3 goto Snap3 } Actions { SetLocator "name=ATAT_PATH_1" GoToLocator "xz_rangecheck" SetMessage "name=Arrived" "value=1" SetState "Update" } } state Snap1 { Conditions { } Actions { SetMessage "name=Arrived" "value=1" SnapToLocator "name=ATAT_PATH_1" SetState "Update" } } state GetLoc2 { Conditions { //Do snaps if not arrived in time if Message "Wave" == 2 and if Message "Arrived" < 1 goto Snap1 if Message "Wave" == 4 and if InMiniCut == 0 and if OffScreenTimer > 1.2 and if Message "Arrived" < 3 goto Snap4 //If got to minicut and not arrived at the right pos if Message "Wave" == 3 and if Message "Arrived" < 3 goto Snap3 } Actions { SetLocator "name=ATAT_PATH_5" GoToLocator "xz_rangecheck" SetMessage "name=Arrived" "value=3" SetState "Update" } } state GetLoc3 { Conditions { //Do snaps if not arrived in time if Message "Wave" == 2 and if Message "Arrived" < 1 goto Snap1 if Message "Wave" == 4 and if InMiniCut == 0 and if OffScreenTimer > 1.2 and if Message "Arrived" < 3 goto Snap4 //If got to minicut and not arrived at the right pos if Message "Wave" == 3 and if Message "Arrived" < 3 goto Snap3 } Actions { SetLocator "name=ATAT_PATH_5" GoToLocator "xz_rangecheck" SetMessage "name=Arrived" "value=3" SetState "Update" } } state Snap3 { Conditions { } Actions { SnapToLocator "name=ATAT_PATH_5" SetMessage "name=Arrived" "value=3" SetState "Update" } } state GetLoc4 { Conditions { if Message "Wave" == 4 and if InMiniCut == 0 and if OffScreenTimer > 1.2 goto Snap4 } Actions { SetLocator "name=ATAT_PATH_4" GoToLocator "xz_rangecheck" SetMessage "name=Arrived" "value=4" SetState "GoToLoc" } } ;Snap into Battle state Snap4 { Conditions { } Actions { SnapToLocator "name=ATAT_PATH_4" SetMessage "name=Arrived" "value=4" SetState "GoToLoc" } } state GotoLoc { Conditions { } Actions { GetLocatorFromGroup "name=atat_dest" "next" GoToLocator "1" "xz_rangecheck" SetState PreAttack } } state PreAttack { Conditions { } Actions { ResetTimer SetState Attack } } state Attack { Conditions { if Random > 0.75 goto Attack if Timer > 20 goto GotoLoc } Actions { FaceOpponent "1" EngageOpponent "sXtatic" "offscreen" "firerange 20" "fireinterval 0.2" } }