/* Generic Carnivore Command Behaviour // */ machine CarnCommand { default state CommandStart { transition IsCommandForceTarget() { action ExecuteCommand() action DeleteCurrentCommand() goto CommandStart } transition IsCommandForceStandStill() { action SetStandStill() action DeleteCurrentCommand() goto CommandStart } transition IsCommandForceSnapToTarget() { goto ForceSnapToTarget } transition IsCommandGotoTarget() { goto GotoTarget } } state ForceSnapToTarget { action ExecuteCommand() action DeleteCurrentCommand() transition { goto CommandStart } } state GotoTarget { action SeekTarget(true, false) transition { goto GotoTargetLoop } } state GotoTargetLoop { action LookAtTargetPosition(2.0) transition InTargetProximity(3.0) { goto GotoTargetEnd } } state GotoTargetEnd { action DeleteCurrentCommand() transition { goto CommandStart } } }