Animation Montage Callbacks


#1

Yet another area where :sk: really makes my life simple.

I have a melee montage that has a notify trigger in it, I want to apply damage when I receive the notify. Here’s how you do it from a :sk: coroutine.

// Create a montage proxy and play the `punch_montage` defined in the blueprint
// this starts the montage playing and gives us something to listen to notifies with
!montage : PlayMontageCallbackProxy.create_proxy_object_for_play_montage(@mesh, @punch_montage)

// Wait until we receive our notify, if you need the name of the notify, you can get it
// using a return argument _wait_notify_begin(;!name)
montage._wait_notify_begin

// Apply damage where our left wrist bone is
apply_damage(@mesh.socket_location("Wrist_L".Name))