How to Enable running function with item?

So in my game I want to make the player be able to buy and equip running shoes.
He can only run when he equip the running shoes,how to achieve this?
I know how to disable the run,but I need to enable it when the player gain running shoes item.
make a event that does this and has parallel process.

Conditional branch check if party has "running shoes"
If
then switch on has running shoes.
esle
then switch off

conditional branch check switch has running shoes is on
if
change speed. 5
else
change speed. 3

wait 1frame


You can also just do this. depending on what systems you need.


conditional branch check if party has "running shoes"
if
change speed. 5
else
change speed. 3

wait 1frame
make a event that does this and has parallel process.

Conditional branch check if party has "running shoes"
If
then switch on has running shoes.
esle
then switch off

conditional branch check switch has running shoes is on
if
change speed. 5
else
change speed. 3

wait 1frame


You can also just do this. depending on what systems you need.


conditional branch check if party has "running shoes"
if
change speed. 5
else
change speed. 3

wait 1frame
Do I need to put this event on every map?
You can have a Common event checking this if you want it to run more often than not.
Check "common events" in game-settings make it be active by switch. turn this switch on when you get the shoes. Also you can add this to turn the common event off again by itself when you loose you shoes.


Conditional branch if party has "running shoes"
if
jump to label:exit
else
turn switch has running shoes = off
label:exit

give me a screenshot of you event and I help you out! 🙂
Three ways to achieve this :

1°) The shoes are items, like the bike in pokemon : Just make the item useable and triggers a common event that enables/disables dashing. There's a lot of plugins that can do that

2°) The shoes are passive key items : No need to enter the menu, once you get the shoes, you permanently get the ability to dash (Like the actual sport shoes in pokemon), just activate the dashing with the plugin command in the event where you get the shoes.

3°)The shoes are accessory / equipment : This one is a bit tricky, and yea you should do as Martin says : a common event that checks if the boots are equipped. But don't fiddle with move speed like that as it can quickly be buggy. Instead, always use a dash toggle plugin. Then your common event looks like this :

Code:
> if running shoes is equipped
> > if Switch : Running shoes is OFF
> >> Turn switch : Running shoes ON // This prevents the common event spamming plugins commands
> > >Plugin command : Toggle Dash ON
> else
> > if Switch : Running shoes is ON
> > > Turn switch : Running shoes OFF // same reason
> > > Plugin command : Toggle Dash OFF
> end
> wait 3 frames

Some Dash Toggle plugins :

YEP's Dash Toggle : http://www.yanfly.moe/wiki/Dash_Toggle_(YEP)
GALV's Disable Dash : https://galvs-scripts.com/2016/05/24/mv-disable-dash/
HIME's Disable Dash : http://himeworks.com/2016/01/disable-dashing/

Pick the one that suits you better 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-enable-running-function-with-item.120955/