/* Generic Carnivore Exhaustion Behaviour // */ machine CarnExhaustion { default state ExhaustionStart { action SetAutoMovementBlend(true) action SetStandStill() action StartLook("LookProximity", 0.5) action AddRandomAnimation("call", "02_lp", 10.0, 15.0) action AddRandomAnimation("tail", "flck_lp", 3.0, 5.0) ;// action SetRandomTimerBetween(1, 1.1, 1.1) ;// action PlayAnimLooping("idle", "brth02_lp", false, -1.0, 1.0) action PlayAnimLooping("spcl", "brth_lp", false, -1.0, 1.0) transition { goto ExhaustionLoop } } state ExhaustionLoop { /* transition IsTimerUp(1) { action PlayAnimLooping("idle", "brth02_lp", false, -1.0, 1.0) goto HeavyBreathLoop } */ } state HeavyBreathLoop { ;// this machine has been greatly simplified with the use of ;// separate look machine running } ;------------------------ Exit States Begin ---------------------- exitstart state CleanUp { action StopAnim("spcl", "brth_lp") action StopLook() transition { goto CleanUpLoop } } state CleanUpLoop { transition IsAnimPlaying("spcl", "brth_lp", false) == false { action SetRandomTimerBetween(1, 0.3, 0.3) goto CleanUpTimeWait } } state CleanUpTimeWait { transition IsTimerUp(1) { goto CleanUpEnd } } exitend state CleanUpEnd { } }