Extends BBMOD_Resource


new BBMOD_Animation([_file[, _sha1]])


An animation which can be played using BBMOD_AnimationPlayer.


Name Type Description
_file String A "*.bbanim" animation file to load. If not specified, then an empty animation is created.
_sha1 String Expected SHA1 of the file. If the actual one does not match with this, then the model will not be loaded.


Name Description
Duration The duration of the animation (in tics).
IsLoaded If false then the animation has not been loaded yet.
TicsPerSecond Number of animation tics per second.
TransitionIn Duration of transition into this animation (in seconds). Must be a value greater or equal to 0!
TransitionOut Duration of transition out of this animation (in seconds). Must be a value greater or equal to 0!
Version The version of the animation file.


Name Description
add_event Adds a custom animation event.
create_transition Creates a new animation transition.
from_buffer Loads animation data from a buffer.
supports_attachments Checks whether the animation supports bone attachments.
supports_bone_transform Checks whether the animation supports bone transformation through code.
supports_transitions Checks whether the animation supports transitions.



Following code loads an animation from a file Walk.bbanim:

    animWalk = new BBMOD_Animation("Walk.bbanim");
catch (_exception)
    // The animation failed to load!

You can also load animations from buffers like so:

var _buffer = buffer_load("Walk.anim");
    animWalk = new BBMOD_Animation().from_buffer(_buffer);
catch (_exception)
    // Failed to load an animation from the buffer!
Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on April 11, 2022 using GMDoc.