The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Crunchywaffle on March 01, 2006, 06:35:35 AM

Title: Help with run button
Post by: Crunchywaffle on March 01, 2006, 06:35:35 AM
Hey, I need help making a run button in RPG maker 2k3. In pressing and holding the shift key, you increase you movment speed. But, when you let go of the shift key, your movment speed returns to normal. I've seen it done before, so I know its possible. If someone knows how, can they please post the script, thanks.
Title: Help with run button
Post by: haloOfTheSun on March 01, 2006, 06:41:55 AM
OK, first, you can't use scripts in 2k3, so I'm moving this.

Secondly... I've tried this before, and I've never quite gotten it to work, but I know you have to use Common Events, set to parallel process. I've gotten it to the point where either you just start out moving fast and you push shift to slow down and you can't get fast again, or the other way around, but I can't get it to toggle.

It's actually not that complicated though. If I sat down and worked on it I could get it, but I haven't worked on my game in a while, just like most people. lol
Title: Help with run button
Post by: blueXx on March 01, 2006, 12:34:14 PM
well reach the point halo stated (parallel common event)
and by using move event change the hero speed to 5 when the run button is pushed or back to 4 when it isn't
aka

if button (run button) is push then
-move event: change speed- 5
else
-move event: change speed- 4

you can also stop him from running all the time by

if switch(stop it) = off then
-if button (run button) is push then
--move event: change speed- 5
--wait 1 frame
--variable(running too much) +1
--if variable(running too much) >= 50 then
---variable(running too much) = 0
---switch(stop it) = on
---move event: change speed: 4
-else
--move event: change speed- 4
--if variable(running too much) > 0 then
---wait 1 frame
---variable(running too much) -1
else
-wait 1 frame
-variable(free) +1
--if variable(free) >= 70 then
---variable(free) = 0
---switch(stop it) = off
Title: Help with run button
Post by: Crunchywaffle on March 01, 2006, 10:56:54 PM
Thanks