Skill doing an "or" operation

BenShreked

Villager
Member
Joined
Feb 8, 2016
Messages
22
Reaction score
2
First Language
English
Primarily Uses
Is it possible to have a skill do an or operation.  I want the state to cause either mp loss " or " hp loss....not at the same time as it does in this example.


This is spirit shackles skill type idea found on Yanfly's tip & tricks page with slight alteration.


<Pre-Damage Eval>


if (user.isStateAffected(45)) {


user.gainMp(-5) || user.gainHp(-100)


}


</Pre-Damage Eval>
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,430
Reaction score
7,711
First Language
German
Primarily Uses
RMMV
Please give a link to the script you're using to process the notetag you gave in your example


I've moved this thread to Plugin support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,848
First Language
English
I'm not sure why the example encourages using the || operator like that since it doesn't really explain what the logic is, but this might work


Basically you generate a random number between 0 and 1, and then say there's a 50% chance of losing MP, or losing HP, but not both.
 

BenShreked

Villager
Member
Joined
Feb 8, 2016
Messages
22
Reaction score
2
First Language
English
Primarily Uses
Thank-you, the skill is now working the way I intended it to.  Sorry I didn't mean to use || in the example.  It was a footnote to myself but you figured it out anyway.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top