Main Menu
  • Welcome to The RPG Maker Resource Kit.

[GM] Help - Character Movement Animation

Started by Shibuya, March 02, 2008, 04:42:05 AM

0 Members and 1 Guest are viewing this topic.

Shibuya

I have already made an object for my character, it has basic movement of left and right now. I have made it to change sprite for the appropriate direction. Now, my problem is, how do I make it change to a my walking sprites while walking and change back to the normal sprite when stopped. I have 8 sprites for walking. Any help is greatly appreciated.

Regards
~Shibuya
Dude do you break dance?

J-Crew

Making it change when walking:

When left or right are held, make the sprite change to the walking ones and set variable:  image_speed  to a number that you think looks good.

Making it change to standing sprite upon stopping:

Make an action for left and right released and change the sprite back and set  image_speed to 0 (or a different number if your stand is animated)

Sorry to make you wait, hope this helps. I'll be able to help more if you need anything else.

Luna

Do you prefer code or D/D (Drag and Drop)? If you ask me, GML is easier than Drag and Drop but then ..

An example is ..

//Press Left Key

sprite_index=spr_RunL


//Release Left Key

sprite_index=spr_Stand


//Press Right Key

sprite_index=spr_RunR


//Release Right Key

sprite_index=spr_Stand



Yeah, you'll need a bit of tweaking to get the code to work properly with your game. It's simple and I know there are some flaws, but it should still be useful.