YEP AutoPassiveStates

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
1,902
Reaction score
802
First Language
French
How to make a condition so that the presence in the inventory of a given item with ID XX gives a passive state?

The condition template is like this:


<Custom Passive Condition>

if (user.hp / user.mhp <= 0.25) {

condition = true;

} else {

condition = false;

}

</Custom Passive Condition>
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,379
Reaction score
1,558
First Language
English
Primarily Uses
RMMV
Where it has
Code:
if (user.hp / user.mhp <= 0.25)
Change it to
Code:
if ($gameParty.hasItem($dataItems[id of item you want to check for]))
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,379
Reaction score
1,558
First Language
English
Primarily Uses
RMMV
Always happy to help!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I didn't think I'd spend the evening jamming out to the battle theme of a Hole Punch.
Welcome back to the dark era, where everything is in dark mode!
.
.
.
I'm not complaining! :o
Currently without internet due to storm damage and most of our state is devastated. No idea how long I'll be unable to log onto here, but I'll answer questions as soon as I can.
This is supposed to be pso2 photon blast inspired animation
I'm sure this question's been asked before, but I can't find an answer: is there any way to run the Steam version of RPGMaker *without* being logged into Steam? It's a frustrating extra step sometimes.

Forum statistics

Threads
100,716
Messages
978,723
Members
132,336
Latest member
shorp_
Top