RMMV YEP Selection Control - State required - multiple states

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
589
Reaction score
159
First Language
English
I have a big attack that I want to only be able to target "Debuffed" targets. I have 13 Debuffs in my project.

I can use this command for the project to assess 1 state:

<Select Conditions>
State: x
</Select Conditions>

Is there a way to assess for ANY of the 13 States/Debuffs ?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,107
Reaction score
1,517
First Language
EN
Primarily Uses
RMMZ
Try something like this (untested)~
Code:
<Custom Select Condition>
var ids = [11,12,13,14,15,16,17,18,19,20,21,22,23];
condition = ids.some(function(id) {
  return target.isStateAffected(id);
});
</Custom Select Condition>
I.e. "condition is true iff the target is affected by at least one of the listed state IDs". :)
 

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

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,190
Members
137,772
Latest member
Kirakirna
Top