Actor Animation API
- Function CreateActorAnimation(actor, start_frame, end_frame, speed)
- Sub SetActorAnimation(actor, animation, num_loops)
Sets the current animation for an actor to start playing.
Notes on num_loops:
- num_loops is the number of times to loop the animation after its done playing. To play the animation once, set num_loops to 0.
- To loop an animation infinitely, set num_loops to -1.
See also
- Sub SetActorAnimationSpeed(actor, animation, speed)
Set the FPS of an actor animation.
See also
- Sub SetActorAnimationFrames(actor, animation, start_frame, end_frame)
Changes the frames that plays in an actor's animation.
See also
- Sub GetActorAnimationSpeed(actor, animation)
Returns actor’s animation speed in frames per second
See also
- Function GetActorCurrentAnimation(actor)
See also
Returns the current animation set in an actor.
Note: Current animation will be 0 if the actor's frame was set with SetActorFrame().
- Function GetActorAnimationStartFrame(actor, animation)
Returns the first frame in an actor’s animation.
See also
SetActorAnimationFrames()
- Function GetActorAnimationEndFrame(actor, animation)
Returns the last frame in an actor’s animation.
See also
SetActorAnimationFrames()
- Sub SetActorFrame(actor, frame)
Sets the current frame of an actor Note: This function will set the actor’s animation to 0 which is a default 1 frame animation that is created when the actor is created.
See also
- Function GetActorFrame(actor)
Returns the current frame number an actor is currently rendering.
See also
SetActorFrame(),GetActorAnimationFrame()
- Function ActorAnimationIsPlaying(actor)
Returns true if an actor is currently playing an animation.
Note: If the number of loops in the animation is set to -1 then this will always be true since it does not return false until it plays the last frame in the last loop.
- Function NumActorAnimationLoops(actor)
Returns the total number of loops the actor is set to repeat the animation for.
- Sub SetActorMD2Animation(actor, anim)
Sets the current animation for an *.md2 model.
Possible Animations:
- MD2_ANIMATION_STAND
- MD2_ANIMATION_RUN
- MD2_ANIMATION_ATTACK
- MD2_ANIMATION_PAIN_A
- MD2_ANIMATION_PAIN_B
- MD2_ANIMATION_PAIN_C
- MD2_ANIMATION_JUMP
- MD2_ANIMATION_FLIP
- MD2_ANIMATION_SALUTE
- MD2_ANIMATION_FALLBACK
- MD2_ANIMATION_WAVE
- MD2_ANIMATION_POINT
- MD2_ANIMATION_CROUCH_STAND
- MD2_ANIMATION_CROUCH_WALK
- MD2_ANIMATION_CROUCH_ATTACK
- MD2_ANIMATION_BOOM
See also
- Sub SetActorMD2AnimationByName(actor, anim_name$)
Sets the current animation for an *.md2 model.
See also
- Sub DeleteActorAnimation(actor, animation)
Deletes an actor’s animation.
- Function GetActorBoneCount(actor)
Returns the number of bones in an actor.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBoneIndex(actor, bone_name$)
Returns a bone index based on its name.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBoneName$(actor, bone_index)
Returns an actor's bone name.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBonePosition(actor, bone_index, ByRef x, ByRef y, ByRef z)
Gets an actor's bone position.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBoneRotation(actor, bone_index, ByRef x, ByRef y, ByRef z)
Gets an actor's bone rotation.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBoneScale(actor, bone_index, ByRef x, ByRef y, ByRef z)
Returns the scale transform for an actor's bone.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBoneRelativeTranform(actor, bone_index, t_matrix)
Stores the local transform of a bone in t_matrix.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)
- Function GetActorBoneAbsoluteTranform(actor, bone_index, t_matrix)
Stores the absolute transform of a bone in t_matrix.
NOTE: This is only for actors that use skeletal animation (ie. *.b3d, *.x, *.ms3d, and actors created from Anim8or files)