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
566
Reaction score
785
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
566
Reaction score
785
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,076
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

Today was not a really productive day, but at least i got some bust sketches going <3
E7QXZHNXoAIkpG8
hmm in exploring MZ with FOSSIL... I see I'll probably need to stick with MV for now as none of the menu altering plugins I use work on MZ lol. and I don't have the money to dump into what I would need in some cases to update plugins to their MZ versions. Everytime I think of converting, 5 or more reasons popup on why I shouldn't.
Hmm... Game has 91 views, 25 downloads, 5 reviews and netted me 7 additional followers. Meanwhile the image I posted just yesterday on Imgur to showcase it has 45,197 views. Interesting, I think I have a new advertising idea. Also Twitter? The post got 16 retweets, 20 likes, and 1,683 views.... And a whole 3 hits to my game, completely valueless. I am glad I did this game jam, this information is quite valuable.
We're playing another Touch the Stars game jam entry, come join us! :D
Ok is telling someone that their drawing isnt good rude

Forum statistics

Threads
113,657
Messages
1,076,481
Members
147,678
Latest member
SLTY
Top