The RPG Maker Resource Kit

Other Game Creation => Other Game Making Programs => Topic started by: fadark on June 22, 2007, 07:47:52 PM

Title: [GM] changing graphics while running
Post by: fadark on June 22, 2007, 07:47:52 PM
i'v seen that in other people's games, the player changes graphics while running.
can someone tell me how to do this?
Title: Re: changing graphics while running
Post by: Arrow on June 23, 2007, 04:28:10 AM
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?
Title: Re: changing graphics while running
Post by: fadark on June 23, 2007, 04:48:19 AM
running as in basic movement in a given direction? (as opposed to standing still)
Title: Re: changing graphics while running
Post by: Arrow on June 23, 2007, 05:22:15 AM
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
Title: Re: changing graphics while running
Post by: fadark on June 24, 2007, 09:49:38 PM
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?
Title: Re: changing graphics while running *(Not Resolved)*
Post by: firerain on June 26, 2007, 01:57:19 AM
Just move his legs and have no motion? Then remove the motion...
Title: Re: changing graphics while running *(Not Resolved)*
Post by: fadark on June 26, 2007, 03:52:52 PM
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?
Title: Re: changing graphics while running *(Not Resolved)*
Post by: Arrow on June 26, 2007, 06:30:32 PM
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
Title: Re: changing graphics while running *(Not Resolved)*
Post by: fadark on June 26, 2007, 07:23:06 PM
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
Title: Re: changing graphics while running *(Not Resolved)*
Post by: Arrow on June 27, 2007, 04:02:09 AM
-hspeed<0
-hspeed>0
-hspeed=0
-place_free(x,y+2)
Title: Re: changing graphics while running *(Not Resolved)*
Post by: fadark on June 27, 2007, 07:32:09 PM
wow! you're either an expert game maker, or im a newb game maker (which i am)..... or both..... lol! thanks!
Title: Re: changing graphics while running
Post by: Arrow on June 28, 2007, 12:09:54 AM
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