Making Dash and Horse Event Systems

Dash and Horse Event Systems

Introduction:
This is my first tutorial... XD
I’m going to show you how to make your character run, mount and dismount a horse, and make the horse run by button.

Requirements:
A sprite of your character riding a horse [Tana’s horses are very popular]
*Optional and Recommended*
A sprite of your character running
A sprite of your character riding a galloping horse [again, Tana’s horse is good]

Notes:
To alter/toggle switches and variables, you would use €œControl Switches” on page one of the event command window.
Conditional Branch is also found on page one of the event command window.
Common Events can be found through Tools>Database [or F9] under the Common Events tab.
Tana’s horses can be found at her site http://www.alisachristopher.us/rmxp/

Making the dash system
€¢ Make a common event called €œDash”. Make its trigger a parallel process with condition switch 001 which will be named €œdash available. €
Make Common Event Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/MakecommoneventDash.png[/IMG]

€¢ Make a conditional branch that the X button [A on the keyboard] is being pressed; make sure you check the €œSet handling options when conditions do not apply” option.
Conditional Branch X is pressed Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/conditionalbranchXispressed.png[/IMG]

€¢ If you have a sprite of your character running, use the €œChange Actor Graphic” event command on page 3 and select your graphic. You don’t have to select a battler.
Change Actor Graphic Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/changeactorgraphic.png[/IMG]

€¢ Using the €œSet Move Route” event command on page 3, select €œChange Speed” in the move route window and select speed 5: Faster.
Set Move Route Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/SetMoveRoute.png[/IMG]
Change Speed Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/Changespeed.png[/IMG]

€¢ For the €œelse” of your conditional branch:
[INDENT]o Use change actor graphic to return to your default sprite if you changed it.
o Use the set move route command and change the speed to 3: Slow.[/INDENT]
€¢ Your event should look like this:
Finished Event Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/DashEventFinished.png[/IMG]

€¢ Now, to be able to dash, you have to have condition switch 001 ON [dash available]. Make an auto run event on the map. Enter the command to turn your switch ON. Use the €œErase Event” command on page one of the event command window in order to prevent jamming. It should look like this:
Autorun Map Event Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/turndashon.png[/IMG]

€¢ Test it out and enjoy!

Making the Horse System
This is unsuprisingly similar to making a dash system. Since you know how to do that now, it should be quicker.
€¢ Make a common event called €œMount Horse”. Make its trigger a parallel process with condition switch 002 which will be named €œHave Horse. €
[You may have to change the maximum number of common events]
Changing the Max Common Events Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/MakecommoneventMountHorse.png[/IMG]

€¢ Make a conditional branch that the Y button [S on the keyboard] is being pressed.
Do NOT select the €œset handling when conditions do not apply” option.
€¢ Make a sub-conditional branch for when switch 003 [name it On Horse] is off.
Use the €œset handling when conditions do not apply” option this time.
€¢ Under this conditional branch:
[INDENT]o Use the change actor graphic command and select the sprite of your character on a horse.
o Use the set move route and change speed commands and set the speed to 4: Fast. [Obviously riding a horse is faster than walking right?]
o Turn on switch 003 and name it €œOn Horse”
o Using the €œwait” command found on page one of the event command window, wait for 20 frames. This prevents the character from flickering between sprite poses.
o [Credit and Thanks for this tip to Icarus Featherfight]
€¢ Under this conditional branch’s else handler:
o Use the change actor graphic command and select your character’s normal sprite.
o Use the set move route and change speed commands and set the speed to 3: Slow.
o Turn off the €œOn Horse” switch
o Wait for 20 frames[/INDENT]
€¢ It will look like this:
Finished Event Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/MountEventFinished.png[/IMG]

€¢ To be able to ride the horse the €œHave Horse” switch [002] ON. You can just add the toggle command in your auto run map event that turns on the dash. Make sure it’s before €œerase event. €
Autorun Map Event Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/AutoRunfinished.png[/IMG]


Galloping
Now we’ll go back and edit your Dash common event.
€¢ Under the €œif X button is pressed” conditional branch, make a sub conditional branch for when the On Horse switch is on. Put the graphic and speed changes for changing the normal sprite to a dashing sprite in this sub-branch’s else handler. For when the sub-branch’s conditions are met:
[INDENT]o Change the actor graphic to your galloping sprite [if you have one]
o Change the speed to 6: Fastest[/INDENT]
€¢ Make another sub-branch under the else handler of the X button is pressed condition. The sub-branch’s condition will be that On Horse is on. Put the graphic and speed changes for returning the dashing sprite to normal in this sub-branch’s else handler. . For when this sub-branch’s conditions are met:
[INDENT]o Change the actor graphic to your sprite of the character riding a horse at normal speed [if you used another sprite]
o Change the speed to 4: Fast[/INDENT]
€¢ Your Dash common event should now look like this:
Finsihed Event Show
http://i78.photobucket.com/albums/j92/chastity_belted/tut%20pics/DashandGallopfinished.png[/IMG]


Anyway, that’s all I have to teach for now. I hope it’s helped someone!
Dats good, ive been looking for that it helped me. Although do you think you have an energy bar so that your not dashing forever, dat will just spoil the game and make it too quick
nice tutorial
Not bad. It's detailed so that gives it an edge.
That's really helpful! But... All of your links are broken
Sorry, I moved my pictures to a sub album. All fixed now.
The link to Tana's horses isn't working. Can it be fixed, or can someone get me the template somehow? I can't seem to find it anywhere..:(
Nah. Tana took all her resources down due to theft, and now she's left. So thats that.
:'(  None of your spoilers show up.  And I'm confused about how to make it so you only sprint for a certain amount of time.  All I can do is the oh-so-simple changing the speed when you equip "Running Shoes". 

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=15268