Check the number of alive enemy in battle

zxdvas

Villager
Member
Joined
Mar 31, 2019
Messages
7
Reaction score
0
First Language
English
Primarily Uses
N/A
(I know this have been answered in RPG MV, but I am not skilled enough to implement it in ace)
I want to make a skill for an enemy that is only usable when there are at least 2 alive enemies.
The skill will "lock" the player so the other enemy can attack ignoring his defense and dodge. (this part I can handle it)
My would-be-implementation is to check at the end of each turn, whether there is at least 2 alive enemies, then open a switch
so that enemy can use that skill. Once it is no longer true, turn the switch off and change the "locked" state into something else.
(of course, I would also check if the player is already "locked" so in the rare occasion of multiple enemy using that skill, all later attempts fail or become something else)
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,461
Reaction score
1,598
First Language
English
Primarily Uses
RMMV
For the event that runs each turn, first inflict an invisible "alive" State on all enemies. Then, check for each enemy if they're inflicted with "Alive" with a conditional branch, and if so, add +1 on a "Monster Count" Variable (also, reset this to 0 at the start of the event). If it counts 2 or higher, turn on the Switch that allow the enemy to use their special Skill. If it counts less than 2, turn off the Switch.
 

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

Latest Threads

Latest Profile Posts

I started really going in on my project April of last year... I'm just now making starting the actual game... making assets (and not even all of them), whoooo... TIME SINK.


Imagine being a pleb and using --------------------.js :LZSwink:
Ami
--- Survival For RPGist Part 2 ---

Survivalist: Now,I going to Test you: Fishing with Spear
M.Spear Knight: Leave it to me.
(M.Spear Knight Spearing the Fish with His Battle Spear)
M.Spear Knight: How it is?
Survivalist: I know you did it,but...Is that the Spear for Battle,not for Fishing?
M.Spear Knight: But,is that same?
Survivalist: (Sigh)...Whatever

Forum statistics

Threads
102,944
Messages
996,180
Members
134,408
Latest member
SosukeTheBro
Top