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,214
Reaction score
1,180
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 Posts

Latest Profile Posts

Maldra wrote on stramin's profile.
Hi regarding the 32 bit -> 64 bit
I am running on a 64 bit windows OS and tried doing this conversion. I converted all of the .exe files that I could find in the KADOKAWA\RPGMV folder using the 4gbpatch.exe file. However, after trying to access RPG Maker MV after this conversion, it simply will not load. Do you have any advice or any ideas?
****ing muscle memory: does anyone else habitually quit out of test play when they notice something they """HAVE""" to fix, in spite of the fact that you can now edit DURING test play?

...thousands of times...

...every day?
Does anyone recognize him? :kaocry:
pwkyiDa.jpg

And hi.
finally drew 3 of the enemies that appear as students from the high school that's in my game.
Finnuval wrote on ShuBun-Kin's profile.
Loving the avatar :D

Forum statistics

Threads
115,928
Messages
1,094,126
Members
151,187
Latest member
NaughtyPoncho
Top