|HgSs run activation|
|Click here for more tutorials!|
This tutorial explains how to make a button that, with one press, activates running for the player, and with another press, deactivates it, similar to HGSS.
I am going to use the
Input::Y that is equivalent to the key 'S' on the keyboard, but you can use other keys, even
Input::A which is the running button, equivalent to the key 'Z'. Change the
ZZZ below for one switch number.
In Scene_Map, before line 'if Input.trigger?(Input::F5)' add:
if Input.trigger?(Input::Y) && $PokemonGlobal.runningShoes pbSEPlay("Choose") # Delete this line to remove the SE $game_switches[ZZZ]=!$game_switches[ZZZ] end
In Walk_Run, line 'if $PokemonGlobal.playerID>=0 && meta &&' add ' !$PokemonTemp.miniupdate &&'.
Also change the line 'return Input.press?(Input::A) &&' to:
return ($game_switches[ZZZ] && !Input.press?(Input::A) || (!$game_switches[ZZZ] && Input.press?(Input::A))) &&