Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Quick Question Regarding 360 Engine?


Zonar Games

Recommended Posts

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

// 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;
        }

  • Like 1
Link to comment
Share on other sites

// 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...