Adding different states via common event (At the start of battle)

Status
Not open for further replies.

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
573
Reaction score
789
First Language
German
Primarily Uses
RMMV
So what I want to do is add certain states to all enemies at the start of any battle.
I'll be doing this via YEP_BaseTroopEvents which calls a common event on Turn 0 of every battle.

The main issue here is that I don't want every enemy to gain the same state.
Basically; All enemies gain the same state while a handful of strong enemies and all bosses gain a lesser variant of that state.

Now I need a way to distinguish boss and strong enemies from common enemies.
One way I thought of was something like this:

Script-Call:

let targets = $gameTroop.members();
targets.forEach(function(target) {
if (COLLAPSE EFFECT !== NORMAL) {
target.addState(x);
} else {
target.addState(y);
}
});

Firstly, I don't know the proper code for checking collapse effects.
Secondly, this solution does not really work for me because I also want it to affect some strong non-boss enemies.

So I need something to distinguish between boss and non-boss to add the states appropriately.

Edit: Any possible directions and alternatives are most appreciated aswell.
 
Last edited:

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
573
Reaction score
789
First Language
German
Primarily Uses
RMMV
Okay, so I am really stupid. Turns out the answer in my case was really simple.

I just give EVERY enemy BOTH states instead of figuring out how to give separate enemies different states. And then I just make Bosses immune to one state and all other enemies immun to the other state.
The rest resolves itself basically.

So in short I did something like this:
I add State X and Y to ALL enemies.
Bosses are immune to State X and thus only gain State Y.
Non-Bosses are immune to State Y and thus only gain State X.

The thread can be closed now. Thank you brain for giving me the obious solution like 20 hours later.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,077
Reaction score
8,913
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

would i get in trouble if i didn't take out the computer icons on my fake computer screen i had Discord, Messanger, and rpg maker up
Auto-Adjust Text Outline, Run Common Events on Transfer | RPG Maker News #111

I sweep the floor. My brother, "You didn't do a good job. There are dust bunnies everywhere." He sweeps the floor weeks later. "I just swept. Why are there dust bunnies everywhere?" Me," Guess you didn't do a good enough job."
Today, I tortured my internet by downloading 20 files at once and then I played a guessing game as to which would finish their download first :kaojoy:
Oh god, just watched HawkZombie's stream of my game and realised that *none* of the branching scenes work properly. One has no character graphic, one soft locks due to a passability issue, and one doesn't have its autorun set to the right trigger. I've got first prize in the bag, baby.

Forum statistics

Threads
113,791
Messages
1,077,505
Members
147,835
Latest member
Shadow1818
Top