• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM (Spine) Animation event only passes default parameters

S

Suppercut

Guest
Hey guys,

Is this a known bug with GMS 1.4? My animation has two "events", named soundeffect and voiceeffect respectively. Animation Event picks up the event names just fine, but any information they were supposed to pass is not passed at all. If I set a default set of data for the event in the Setup screen, it passes that and only that.

So, for example, soundeffect has default value of "nothing". At three points in the animation taunt1, the soundeffect event is played with the values "snd_swing4", "snd_bladeclash", and "snd_grab" all at specific points in the animation. However, every time Animation Event is triggered, "string" returns "nothing" every time.

I know Game Maker has a serious issue with certain things I try to get it to do, like making a bone not inherit angle so that it sort of dangles (which it rejected right out) or having to key literally every single bone of the model at the beginning of every animation so Game Maker doesn't forget to close the player's hands after an action, because it doesn't seem to read any changes on the very last frame of it. I feel like making a new event for every single sound effect in my game feels cumbersome. Is this just something I have to deal with or is there some sort of trick to it?

I could provide a link to any files in use if anyone wanted to look at it, but it would have to require moderator approval since this is a new account (I used to be headinjurygames but that profile is completely missing for some reason and I can't recover it).
 
J

Justinbaileynes1987!

Guest
if your trying to play a sound on a specific frame of an animation game maker has a function to check what frame of the animation your on. use this to play your sound. ill put an example from a game im doing

Code:
//this is from the air attack animation for a fighting game im doing

if image_xscale = 1
{
if skeleton_animation_get_frame("attack_left") = 6 instance_create_depth(x+144,y-230,10,obj_lefthitbox)
if skeleton_animation_get_frame("attack_left") = 9 instance_destroy(obj_lefthitbox)
}
else
{
if skeleton_animation_get_frame("attack_left") = 6 instance_create_depth(x-144,y-230,10,obj_righthitbox)
if skeleton_animation_get_frame("attack_left") = 9 instance_destroy(obj_righthitbox)
}


// as you can see it checks what frame we are on and puts the hitbox and kills it after you can use this to play your sound
 
S

Suppercut

Guest
if your trying to play a sound on a specific frame of an animation game maker has a function to check what frame of the animation your on. use this to play your sound. ill put an example from a game im doing

Code:
//this is from the air attack animation for a fighting game im doing

if image_xscale = 1
{
if skeleton_animation_get_frame("attack_left") = 6 instance_create_depth(x+144,y-230,10,obj_lefthitbox)
if skeleton_animation_get_frame("attack_left") = 9 instance_destroy(obj_lefthitbox)
}
else
{
if skeleton_animation_get_frame("attack_left") = 6 instance_create_depth(x-144,y-230,10,obj_righthitbox)
if skeleton_animation_get_frame("attack_left") = 9 instance_destroy(obj_righthitbox)
}


// as you can see it checks what frame we are on and puts the hitbox and kills it after you can use this to play your sound
This really isn't useful at all to me. If I make any changes to the animation at all, it doesn't reflect in-game unless I re-edit the code. The entire point of the events system was so that you didn't have to re-edit the code with the different numbers. It was so that you could visualize the timing without having to export, import, re-compile, test, find out it's wrong, edit the code, recompile, test, maybe find out it's wrong again, etc...

The solution you provided above is, in fact, exactly what I am currently doing, because it's common sense. But the fact of the matter is that this is unintended behavior on Game Maker's behalf and should be fixed.
 
S

Suppercut

Guest
What version of 1.4 are you using / testing this with?
v1.4.1772, the latest version on both branches.

Sorry, okay, just learned there's a new beta version, but literally the only change is to Windows UWP, completely useless to me. I'll give it a go on that particular version, but there's no reason it'll be any different.
 
Top