SetAnimationPosition

Category: Animations
Since engine version: 1.0 OC

Description

Sets a new position for the given animation. Returns true if the new AVP was set or false if there is no such animation with the given number or the number refers to a combination node.

Syntax

bool SetAnimationPosition(int animation_number, array position, int attach_number);

Parameters

animation_number:
Animation number of the animation whose position to set.
position:
Specifies how to compute the position of the animation. The value needs to be created with one of the "Anim_" animation functions.
attach_number:
[opt] If given, refers to the number of the attached mesh whose animation to change.

Remark

See the animation documentation for further explanations of the animation system.

Example

SetAnimationPosition(animation_number, Anim_Const(GetAnimationPosition(animation_number)+100));
Script for a timer: For each call the animation is advanced by 100 milliseconds. If the timer is called periodically in same intervals Anim_Linear can be used instead.
See also: Anim_AbsX, Anim_AbsY, Anim_Action, Anim_Const, Anim_Linear, Anim_X, Anim_XDir, Anim_Y, Anim_YDir, GetAnimationPosition, GetAnimationWeight, PlayAnimation, SetAnimationWeight
Clonk-Karl, 2010-01