All Enemies Dead issue

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
91
Reaction score
14
First Language
English
Primarily Uses
RMMV
Hello, hopefully someone can help me here. I have set up a battle system where if a critical hit happens if uses a combo move. I have done this by adding a common event to my attack command that has a percentage chance of activating. However even if all the enemies are dead, the common event will still force that skill before the battle ends. I was hoping to use a conditional breach to check if all enemies are dead and if they are skip using that move. Is there a script call I could use, or any other suggestion i might try?


Any help is greatly appreciated.


Thanks!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
no need for a script, that can easily be done by event commands.


Unfortunately it needs a series of commands (unless you really know what you're doing)


Basically you'll need to check all enemies for HP>0 and only execute the rest of the event if there is at least one enemy with HP left.


You get the enemy HP for each index with a control variable command (game data: enemy #'s HP).


Then you'll need to check the variable with a conditional branch.


Which means you'll need eight pairs of commands, and if one results in a number >0 then you can execute the event, otherwise exit event processing.
 

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
91
Reaction score
14
First Language
English
Primarily Uses
RMMV
Awesome! thank you so much. I will try this out shortly!
 

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
91
Reaction score
14
First Language
English
Primarily Uses
RMMV
Oh my god I can't thank you enough. You got me on the right page with the variables thing and I was able to streamline it by adding the totals of all of the enemies HP and using that variable as the conditional. Again thank you friend!
 

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