YesNoOk
avatar

Anim (Triggers) (Read 6260 times)

Started by JustNoPoint, September 08, 2015, 10:10:00 pm
Share this topic:
Anim (Triggers)
New #1  September 08, 2015, 10:10:00 pm
  • ******
    • www.justnopoint.com/
Returns the current animation action number of the player.

Format:
Anim
Arguments:
none
Return type:
int
Error conditions:
none
Example:

Code:
trigger1 = Anim = 200
  Triggers if the player is currently in action 200.

Anim = the animation number.
Last Edit: September 18, 2015, 02:58:04 pm by Just No Point
Re: Anim (Triggers)
#2  September 09, 2015, 07:07:05 am
  • *****
  • Shame on you!
    • USA
You can also have
    trigger1 = Anim = [200,299]
      Triggers if the player is currently in any action between 200 and 299.

So if the animation was 234 it'd still activate.
This is a viable way to reduce using variables. Instead of using a variable to keep track of what animation(s) have been used you can get a trigger to activate without it.
You could switch animations from 200 to 201, in the middle of the Statedef, and using trigger1= Anim = 201 define a new set of characteristics for that state.

Also
    trigger1 = (Anim = [200,299])  &&  (Anim != [233,235])
      Triggers if the player is currently in any action between 200 and 299, but not animations 233, 234, or 235.
vVv Ryuko718 Updated 10/31/22 vVv