• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!

GMS 2 How do i trigger something on Spine Event?

MadPropz101

Member
I have made an event in my Spine animation, and want to play a sound in gamemaker when the event is triggered, i'm having trouble finding info on the subject.
 

MadPropz101

Member
I just figured it out, it goes something like:

var get_event = event_data[? "name"];

if (get_event == "step")
{
audio_play_sound(snd_Step, 1, false);
}

Wish there was a more efficient way of doing this, hopefully YoYo adds a spine event function with the new update.
 

orbis

Member
Code:
var evName = event_data[? "name"];
var evTrack = event_data[? "track"];
var evInt = event_data[? "integer"];
var evFloat = event_data[? "float"];
var evString = event_data[? "string"];

show_debug_message("Name  : " + evName);
show_debug_message("Track : " + string(evTrack));
show_debug_message("Int   : " + string(evInt));
show_debug_message("Float : " + string(evFloat));
show_debug_message("String: " + evString);
 
Top