//FactoryD ReferenceScript { Script=GenericDefend Source=Global ReturnState=Base Conditions { } } state Base { Conditions { if IAm "R2D2" == 1 goto DroidUpdate if PreviousResult == 0 goto NormalUpdate } Actions { } } state NormalUpdate { Conditions { if InTriggerArea "InPot" == 1 goto DoNothing } Actions { FollowPlayer "0.75" } } state DroidUpdate { Conditions { if InTriggerArea "InPot" == 1 goto DoNothing } Actions { FollowPlayer "1.5" } } state DoNothing { Conditions { if InTriggerArea "InPot" == 0 goto Base } Actions { Idle } }