0
\$\begingroup\$

We are learning how to use Gamemaker 8.1 in my game design class, and I wanted to experiment with it, and try to make my own game. I have run into a problem when trying to animate an object walking. I've looked all over google for how to animate the walking, but the only tutorials I can use what looks like a different kind of Gamemaker where you code everything.

To specify, I am using the version of Gamemaker where you drag and drop different actions into events. You can add code, but I would prefer not to use it.

I would like to know a way to either import a sprite sheet or a gif and have a walking animation play while the character is moving whenever you use the arrow keys.

\$\endgroup\$
1
  • \$\begingroup\$ That would be game maker: studio that you keep seeing. It is still drag and drop. The tutorials aren't using DnD is all that's going on there. \$\endgroup\$
    – user64742
    Commented Dec 28, 2018 at 6:10

1 Answer 1

1
\$\begingroup\$

FYI, the version of game maker you saw was Game Maker: Studio which was a rewrite and the version immediately proceeding 8.1. It does have drag and drop. The people writing tutorials just aren't using them is all that is going on there.

Now as for how to do the walking animation:

Use one sprite for each movement direction.

For each press event for the arrow keys set the sprite to the appropriate direction.

For each release event set the image_speed to 0.

Adjust the logic accordingly if your movement system differs.

Basically just change the sprite whenever you tell your object to change a movement direction, and set the image_speed to 0 (pause the animation) whenever you make the motion stop. Since I don't know all the complexities of your motion system and exactly how the game is designed to respond to multiple buttons pressed simultaneously this philosophy and way of thinking will serve you better. It is also preferable for any future developers reading this question.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .