| NewAnimation
Creates a new animation
bSuccess = myActive.NewAnimation( Name, Animation, FPS, Width, Height )
bSuccess = myActive.NewAnimation( Name, Animation, FPS )
bSuccess = myActive.NewAnimation( Name, Animation )
Return value
TRUE if the animation is added successfully, otherwise FALSE.
Parameters
- Name
Name to give the animation (not case sensitive)
- Animation
Name / index of animation in the Animations or Pictures bank
- FPS
Frames Per Second of animation. Note that this will NOT automatically set to the FPS defined in the animation for technical reasons (Jamagic won't give out the information)
- Width
Width to stretch the animation to
- Width
Height to stretch the animation to
Comments
There are several special animations which will work with movements automatically:
- Appearing
If found, this animation is played when an instance is created
- Stopped
The default animation - played when not moving
- Walking
An animation to play when moving slowly
- Running
An animation to play when moving quickly
- Crouching
Played when crouching in platform movements
- CrouchWalk
Played when crouching and moving
- CrouchRun
Played when crouching and moving quickly (if allowed by settings)
- Jumping
Played when the active is jumping up
- Falling
Played when the active is falling down
- Climbing
Played when the active is climbing a ladder
- Sidling
Played when the active is moving sideways on a ladder
- Balance
Played when the active is on the edge of a platform
- Hanging
Played when the active is holding the side of a platform
- Disappearing
If found, this animation is played when an instance is destroyed - note: this creates a new special object to play the animation then self-destruct. The active object is still destroyed instantly.
Temporary animations can be set using the Set or SetAnimationSurface functions of instances, rather than creating the animation to play it once.
See also
Class Active:SetAnimation
JAM © 2005 no one in particular Project started by David Evans in 2005 | |