Gets the animation-time elapsed since the start of a specified element of the current animation action. Useful for synchronizing events to elements of an animation action. (reminder: first element of an action is element 1, not 0)
AnimElemTime has similar functionality to AnimElem, but can take expressions as its argument.
AnimElem = value1
AnimElem = value1, [oper] value2
=, !=, <, >, <=, >=
Element number to check.
Value of animation-time to compare with.
boolean int (1 or 0)
Returns bottom if the specified element number is invalid for this action (e.g., it's too large or too small).
Trigger in Format 1 is true if the player's animation is at the start of the element number specified by value1. In other words, if value1 is equal to n, it is true on the first game-tick of the nth element of the animation.
Trigger in Format 2 compares the player's animation-time to t+value2, where t is time of the start of the element number specified by value1.
AnimElem will not trigger on the first game-tick of the second or later loop of an animation with a finite looptime. For example, "AnimElem = 1" will trigger the first tick a player changes to an animation, but will not trigger on the tick that it loops. You may get it to trigger each time using "AnimElem = 1 || AnimTime = 0".
trigger1 = AnimElem = 2
True on the first game-tick that the player's animation
is on element 2. Is equivalent to saying:
trigger1 = AnimElem = 2, = 0
trigger1 = AnimElem = 2, = 4
True 4 game-ticks after the start of the player's
second animation element.
trigger1 = AnimElem = 2, >= 0
trigger1 = AnimElem = 3, < 0
True for the whole of the second element of the player's
animation, assuming there is a third element. If a
third element does not exist, the second line should
trigger1 = AnimTime <= 0
AnimElem = the element / frame of the animation.