Page 1 of 1

The Perfect Running System

PostPosted: Fri Jun 16, 2006 8:41 pm
by Stedar
Hey, i need a good tut. on how to make a running system.
I want it to go like this but i have no idea how to code it.

Press and hold enter and the hero runs.
Let go and he stops..


Any help is greatly appreciated...
P.s: I might also like to know how the coding works
for holding a button and letting go.

PostPosted: Fri Jun 16, 2006 11:21 pm
by AznChipmunk
You're using RPGMaker, right? So make a common event, parallel process. And the trigger switch should be something like: RunningPossible.

Then make a command like Input Key and check the one with the button you want to use for running. Don't check wait for push key. Then use fork conditions to see when it is held, and to change hte character's speed and grapahic and stuff. Meh. Easy.

PostPosted: Sat Jun 17, 2006 8:17 am
by Stedar
It works okay, but how can i make it so that when you let go
you stop running, because if you hit it really fast again, he speeds
up even more...

PostPosted: Sat Jun 17, 2006 9:03 pm
by AznChipmunk
You have to add a command somewhere that sets the 'inputed variable' back to zero, and a fork condition that when that variable is at zero, and a certain switch is on, speed changes back. You need a switch, so you wont get slower and slower. So make a switch turn somewhere next to the 'speeding up' command, and, make another fork condition under the one listed above before you make him slow down.

Kinda hard to explain. xD Be sure to give me credit. Or something...

EDIT: Ya know, if you can't figure it out, it's a lot easier to have him run after psuhing it once, and walk after pushing it again. Toggling, or something like that.

*Whacks head against desk

PostPosted: Sun Jun 18, 2006 6:10 pm
by AznChipmunk
xD Oops, sorry double post...

Anyways...
Image
Make sure the number is the one checked, shown below. In my case it's "Shift", or "7."
Image
Check the box you want to be the button that's held.
That's more or less what the code should look like. I tested it already.

By the way, pic of my game with my beautiful mapping.

Image

PostPosted: Sun Jun 18, 2006 10:01 pm
by Teenr0cker
The way has forever scarred the way I look at sprite chars. I'll be like OMGWTF Alan is a total stud in this game or ZOMG Rhue is a chick in this one?!?



Yup.... :)

PostPosted: Mon Jun 19, 2006 1:52 pm
by Stedar
Thanks a whole bunch asian, you helped me a lot.
Yep, your in the credz.



teenrocker- lol in which game was rhue a girl??