Main Menu
  • Welcome to The RPG Maker Resource Kit.

[GM] changing graphics while running

Started by fadark, June 22, 2007, 07:47:52 PM

0 Members and 1 Guest are viewing this topic.

fadark

i'v seen that in other people's games, the player changes graphics while running.
can someone tell me how to do this?

just so everyone knows, im 15 years old.

Arrow

Absolutely, but you'll need to better outline what it is exactly. Do you mean running as opposed to walking, or running as in basic movement in a given direction?

fadark

running as in basic movement in a given direction? (as opposed to standing still)

just so everyone knows, im 15 years old.

Arrow

Ah, thats simple enough. Make it so when a movement key is pressed (not held, pressed) the sprite is changed accordingly. When it is released, change it back. :D

fadark

#4
oh! i overlooked that. i didnt think it was so simple. thanks man!

[edit]
wait, that's not what i meant. i dont want a running sprite. i want a running sprite animation.
in other words:
i want my character to move his legs (like in the legend of zelda platformer)

can you tell me how to do that?

just so everyone knows, im 15 years old.

firerain

Just move his legs and have no motion? Then remove the motion...

fadark

thats not what i mean. i want him to move his legs and have motion. i have heard something about subimages but im not completely sure what they are. what are they?

just so everyone knows, im 15 years old.

Arrow

#7
Look through the sticky full of examples I stopped updating for some reason. In there you should find one called FoxNL's Platform example. (or whatever it's called, I know it had Fox somewhere in it) That should answer all of your questions.

EDIT: http://rmrk.net/index.php/topic,12923.0.html

fadark

ok, thanks! but i have one more question.
can someone give me the expressions (that can be used in the "Test Experssion" event) that:

-test weather the player is moving left
-test weather the player is moving right
-test weather the player is not moving to the left or right (but might be moving up or down)
-test weather the player is in the air

just so everyone knows, im 15 years old.

Arrow

-hspeed<0
-hspeed>0
-hspeed=0
-place_free(x,y+2)

fadark

wow! you're either an expert game maker, or im a newb game maker (which i am)..... or both..... lol! thanks!

just so everyone knows, im 15 years old.

Arrow

lol, not quite expert I don't think, I still ask a dumb question or two myself every now and then. That wasn't a dumb question though, it's good you asked it. So you know, you can use basic math symbols, like +, -, *, (multiplication) or / (division) in almost any kind of mathematic formula in GM. For instance, if you wanted to make an object move at half the player's current hspeed, you would say:

self.hspeed=player.hspeed/2