//RetakeB ReferenceScript { Script=GenericDefend Source=Global ReturnState=Base Conditions { } } state Base { Conditions { if CategoryIs "Jedi" == 1 goto JediUpdate if PreviousResult == 0 goto NormalUpdate } Actions { FollowPlayer "1" } } state NormalUpdate { Conditions { if EitherPlayerOnDoorTrigger "pad_door_1" == 1 goto DoorTrigger } Actions { FollowPlayer "1.5" } } state JediUpdate { Conditions { if EitherPlayerOnDoorTrigger "pad_door_1" == 1 goto DoorTrigger } Actions { FollowPlayer "0.75" } } state DoorTrigger { Conditions { if EitherPlayerOnDoorTrigger "pad_door_1" == 0 and if DoorOpen "pad_door_1" == 0 goto Base if EitherPlayerOnDoorTrigger "pad_door_1" == 0 and if DoorOpen "pad_door_1" == 1 goto JustOpenedDoor } Actions { GoToDoorTrigger "name" "pad_door_1" "waittime=2" } } state JustOpenedDoor { Conditions { } Actions { Idle "2" SetState "Base" } }