add_event

function

add_event(_frame, _name)

Description

Adds a custom animation event.

Arguments

Name Type Description
_frame Real The frame at which should be the event triggered.
_name String The name of the event.

Returns

Struct.BBMOD_Animation Returns self.

Example

animWalk = new BBMOD_Animation("Data/Character_Walk.bbanim");
animWalk.add_event(0, "Footstep")
    .add_event(16, "Footstep");
animationPlayer.on_event("Footstep", method(self, function () {
    // Play footstep sound...
}));
Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on September 19, 2022 using GMDoc.