An efficient way to have a running button, and it just needs 1 common event, 1 switch and 1 variable.
The reason I have it increase the speed all the way then decrease it some for running is so that it will always go to the correct speed I want. So if you want to run faster, don't decrease the speed so much after increasing it. Or if you want the walking speed different, either don't add as many speed increases, or add more if you want the walking speed faster.
Code:
Key Input Processing: [0001:Run]
Conditional Branch: Variable [0001:Run] == 7
Conditional Branch: Switch [0004:RUNNING] is ON
Else
Set Move Route: Player, Speed Up, Speed Up, Speed Up, Speed Up, Speed Up, Speed Down, Speed Down
Control Switches: [0004RUNNING] = ON
Branch End
Else
Conditional Branch: Switch [0004:RUNNING] is ON
Set Move Route: Player, Speed Down, Speed Down, Speed Down, Speed Down, Speed Down, Speed Up, Speed Up
Control Switches: [0004:RUNNING] = OFF
Else
Branch End
Branch End
The reason I have it increase the speed all the way then decrease it some for running is so that it will always go to the correct speed I want. So if you want to run faster, don't decrease the speed so much after increasing it. Or if you want the walking speed different, either don't add as many speed increases, or add more if you want the walking speed faster.