RPG Maker Forums Archive
Search Settings
Home › Game Development Engines › Legacy Engine Support › RPG Maker MV Support

How to get how many enemies are NOT affected by a state

RPG Maker MV Support
K Kcluuqczeas
Jul 10, 2021 23:26
Hi!
How can I assign the number of enemies that are NOT affected by a certain state to a variable?
Thanks!
T Trihan
Jul 10, 2021 23:28
$gameVariables.setValue(id of variable, $gameTroop.aliveMembers().filter(member => !member.isStateAffected(id of state)).length)

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-how-many-enemies-are-not-affected-by-a-state.138375/

This is an unofficial, read-only archive preserved for the community. Original site: https://forums.rpgmakerweb.com

Want your posts removed? See removal requests or email [email protected]. · Preserved with Forum Ark · Privacy · About