Zonar Games Posted January 18, 2007 Report Share Posted January 18, 2007 Ok I have a script for objSonic where when on ground and key_melee_pressed he does a melee move like a kick or punch but only on ground but what kinda confuses me is when the animation is over I want it to go back to action_normal. Well here is my script. Any suggestions? // If on ground = true then do a kick attack if (ground == true && key_melee_pressed) { action = action_kick; x_speed = 0; sound_play(snd_melee); } else { action = action_normal;[/CODE]PS: By the way I'm not using the Xmas pack but one of the older 360 engines.EDIT: I'm using Game Maker 6.1 too. Link to comment Share on other sites More sharing options...
Damizean Posted January 18, 2007 Report Share Posted January 18, 2007 // If on ground = true then do a kick attack if (action == action_normal && ground == true && key_melee_pressed) { action = action_kick; x_speed = 0; sound_play(snd_melee); } else if (action == action_kick) { if (animation != "kick") action = action_normal; } 1 Link to comment Share on other sites More sharing options...
VectorSatyr Posted January 18, 2007 Report Share Posted January 18, 2007 // If on ground = true then do a kick attack if (action == action_normal && ground == true && key_melee_pressed) { action = action_kick; x_speed = 0; sound_play(snd_melee); } else if (action == action_kick) { if (animation != "kick") action = action_normal; } Don't forget to set the linked animation to "Idle"; otherwise, the above won't work. Link to comment Share on other sites More sharing options...
Recommended Posts