/* // // Look at Pre-Acquired Target Unit // // This script should be called via the StartLook() action and stopped via the StopLook() action // // **WARNING**: // This script should never call other scripts nor should it be called directly within other scripts // */ machine LookTarget { state LookStart { action LookEnd() transition { direct goto LookFind } } state LookFind { transition HasTarget() == true { action LookAtTargetPosition(0.0, true) ;// use pre-set speed goto LookLoop } } state LookLoop { transition HasTarget() == false { action LookEnd() goto LookFind } action LookAtTargetPosition(0.0, true) ;// use pre-set speed } ;/////////////////////////////////////////////////////////////// ;// Exit States exitstart state LookExitStart { transition { direct goto LookExitEnd } } exitend state LookExitEnd { } }