How can I check if the party have any status (state) at all?

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
Hi all!! Im using Yanfly plugin Skill Core: http://yanfly.moe/2015/10/13/yep-8-skill-core/

There is a feature that checks some requirements before making the skill available. I want the skill to be unavailable if no state is present on any party member, but I dont know how to check for it.

Something like:

Code:
if ($GameParty.isStateaffected(id)) {  
value = true;
 } else {
    value = false;
  }
Of course this code doesn`t work, just to give an idea.

Any help?

Thanks all!
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
if ($gameParty.members()[0]._states.length == 0 && $gameParty.members()[1]._states.length == 0 && $gameParty.members()[2]._states.length == 0 && $gameParty.members()[3]._states.length == 0) {
visible = true;
} else {
visible = false;
}
 

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
Thank you!!!

Edited: Hi @Poryg ! I thought it worked but, It always returns false, the if condition is never met and Im positive that the 4 actors are clean of states.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top