AnimElem/fr
From M.U.G.E.N Wiki
This page is in progress of being translated to fr. You can help translating it or go to another language version that follows:
Trigger: AnimElem(*,***)
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.
- Format:
- AnimElem = value1
- AnimElem = value1, [oper] value2
- Arguments:
- [oper]
- =, !=, <, >, <=, >=
- value1 (int)
- Element number to check.
- value2 (int)
- Value of animation-time to compare with.
- Return type:
- boolean int (1 or 0)
- Error conditions:
- Returns SFalse if the specified element number is invalid for this action (e.g., it's too large or too small).
- Details:
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.
- Notes:
- 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".
Examples:
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
read,
trigger1 = AnimTime <= 0
