/* Spit Recoil Machine // // This machine is run on the target, but called from the attacker. // The attacker needs to call the following actions before setting it's target to run this machine: // // action SetTargetToSlave() // action SetNumPassedParamTarget(1) ; sets up the parameters required by this machine // action SetPassedParamTargetKnockDir(0) ; 1, 2 = left, 3, 4 = right // action SetTargetsTargetToMe() // action SetTargetFSM(fsm::"SpitRecoil") // */ machine SpitRecoil { state RecoilStart { action SetAutoMovementBlend(true) ;//action PlayAnim("idle", "recl_lp", false) action PlayAnim("rcl", "lt", false) transition { goto RecoilLoop } } state RecoilLoop { ;//transition IsAnimPlaying("idle", "recl_lp", false) == false transition IsAnimStatePlaying("rcl", false) == false { ;//action UpdateVariable("health", -5.0) action TargetHurtMe(false, 1.0) goto RecoilEndStart } } ;//------------------------ Exit States Begin ---------------------- exitstart state RecoilEndStart { transition IsAnimPlaying("idle", "recl_lp", false) { goto RecoilEndWait } transition { goto RecoilEnd } } state RecoilEndWait { transition IsAnimPlaying("idle", "recl_lp", false) == false { goto RecoilEnd } } exitend state RecoilEnd { action DeleteAllCommands() } }