Drake616

Veteran
Veteran
Joined
Oct 8, 2020
Messages
33
Reaction score
7
First Language
English
Primarily Uses
RMMZ
Is there a way to check the total number of states (different ones) an enemy/actor is affected by ?
I know that you can use isStateAffected to check for the individuals, but I'd love a total.
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
168
Reaction score
104
First Language
English
Primarily Uses
RMMZ
Hi, I can help you.
How would you like to implement this and display?
The Easiest way is to:

Step 1: Create a new Common Event, let's call it "State Count Scan".
- Add new Script(page 3).
-Paste this code:
$gameMessage.add('Currently ' + BattleManager._target.states().length + ' States applied to target.');
This will display a message "Currently x States applied to target.".
x being the number of states.
*You can change this message to whatever suits you.

Step 2: Create a new Skill, let's name it "State Count Scan".
-Setup the skill as you like. *Take note that Occasion is Battle Screen.
-Under Effects, link the Common Event "State Count Scan".

StateScanSkill.png
Change settings to however suits your game.
You should have a result like this.

Step 3: Apply some states and scan away!

Hope this helps!
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,211
Reaction score
1,176
First Language
English
Primarily Uses
RMMV
@NaosoX That's pretty a in-depth walkthrough when we have no clue that's what the OP wants to do with the information :biggrin:

@Drake616 as NaosoX mentioned in his post, the way to get the total number of states is actor.states().length
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
168
Reaction score
104
First Language
English
Primarily Uses
RMMZ
@NaosoX That's pretty a in-depth walkthrough when we have no clue that's what the OP wants to do with the information :biggrin:

@Drake616 as NaosoX mentioned in his post, the way to get the total number of states is actor.states().length
That way, in case others who aren't necessarily looking for this can take something away to learn or explore on their own and in their own way. :thumbsup-left::):thumbsup-right:
 

Latest Threads

Latest Profile Posts

Finally got my website fixed and the security sorted so it's been a productive day. Can I go to sleep now? I mean... I don't need to work right?
It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.
I just love the MV feature that allows you to create your own animations!

Forum statistics

Threads
115,919
Messages
1,094,013
Members
151,174
Latest member
sardin
Top