How to Enable running function with item?

DigitalWF

Veteran
Veteran
Joined
Apr 13, 2020
Messages
208
Reaction score
54
First Language
English
Primarily Uses
RMMV
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.
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
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
 
Last edited:

DigitalWF

Veteran
Veteran
Joined
Apr 13, 2020
Messages
208
Reaction score
54
First Language
English
Primarily Uses
RMMV
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?
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
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! :)
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
109
Reaction score
15
First Language
french
Primarily Uses
RMMV
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 :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Dev stream today, come on by and ask questions about rpg maker!
Fun fact: If your story introduces a variety of different races, the "human race" will automatically become the most corrupt race in general.
Finally finished my late start entry for the jam. Now. I. Sleep.
Just made 3 easy, simple and small MZ plugins today(12 hours straight), and I never thought I could ever do this.
Now I feel myself being very productive, even though I know I'm just utterly flattering myself lol
Mind: "I have cool ideas! Let's make it real!

Body: "You wanna make sumthin? I'm in."

Eyes: "Go to sleep, go to sleep."

*Sleep*

Forum statistics

Threads
104,646
Messages
1,007,812
Members
136,132
Latest member
A87
Top