AnimElemTime (Triggers) (Read 2929 times)

Started by Just No Point, September 09, 2015, 05:56:43 PM
Share this topic:
AnimElemTime (Triggers)
New #1  September 09, 2015, 05:56:43 PM
  • ******
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)

Expression that evaluates to the element number to check (int).
Return type:
Error conditions:
Returns bottom if exprn evaluates to bottom, or if exprn evaluates to an element number that is not valid for the current action.
AnimElemTime will not trigger on the first game-tick of the second or later loop of an animation with a finite looptime. For example, "AnimElemTime(1) = 0" 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 "AnimElemTime(1) = 0 || AnimTime = 0".

trigger1 = AnimElemTime(2) = 0
  True on the first game-tick that the player's animation
  is on element 2. Is equivalent to saying:
    trigger1 = AnimElem = 2

trigger1 = AnimElemTime(2) = 4
  True 4 game-ticks after the start of the player's
  second animation element.

trigger1 = AnimElemTime(2) >= 0
trigger1 = AnimElemTime(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 will evaluate
  to bottom and hence trigger1 will never trigger. In this case,
  the second line should read,
    trigger1 = AnimTime <= 0
Last Edit: September 18, 2015, 02:57:23 PM by Just No Point