RMMV Script for conditional branch for item names

petpous

Villager
Member
Joined
Apr 25, 2021
Messages
23
Reaction score
1
First Language
English
Primarily Uses
RMMV
So you know how you can create a conditional branch that says
If the player name is X
do this
screenshot1.PNG<--- like this
Does anyone have any javascript that could do something similar but
If the item name is x
do this
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
704
Reaction score
224
First Language
Vietnamese
Primarily Uses
RMMV
I think you can go to page 4 of Conditional Branch and select Script. Try to input this:
Code:
$dataItems[x].name === "Bob"
X is your item ID.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,011
Reaction score
1,523
First Language
Dutch
Primarily Uses
RMMV
data items cannot be changed unless you let the player "name"
them or change them.

so you need to use a input name to name them, and then compare
if it is the name of the conditional, (unless you have the plugin for that)

than the methode provided by JamesRyan can work.
 

Latest Threads

Latest Posts

Latest Profile Posts

I always end up having issues with things i'd never expect.

Capture.PNG

Those friggin mountains man xD
Time for my daily walk/jog ''Literally starts raining while I open the door''
I just discovered there's a giant jellyfish in the Ace RTP. My day is made.
I'm pretty sure I submitted a username change like 4 months ago.
...
No offense but uh, still waiting for my name to be updated :/

Forum statistics

Threads
112,398
Messages
1,068,052
Members
146,052
Latest member
Prandom
Top