Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,412
Reaction score
1,106
First Language
French
I know this works for a specific actor:

$gameActors.actor(1).isDebuffAffected(7)

But without using tons of fork conditions, is there a way to just check all of them?
 

Dungeonmind

Lvl 4000 Humanoid
Veteran
Joined
Sep 2, 2013
Messages
667
Reaction score
542
First Language
English
Primarily Uses
RMMZ
Theoretically, you could use javascript for this and just Loop the actors to find what you're looking for.

JavaScript:
for(let i = 0; i < $gameParty.battleMembers().length; i++) {
    if($gameParty.battleMembers()[i].isDebuffAffected(7)) {
    //code or stuff happens.
    }
}
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,809
Reaction score
5,654
First Language
English
Primarily Uses
RMMZ
JavaScript:
$gameParty.members().some(member => member.isDebuffAffected(7));
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,809
Reaction score
5,654
First Language
English
Primarily Uses
RMMZ
Even better.
For future reference as well if you're not aware of this, you don't need to specify battleMembers() for something in battle; internally, members() already returns battleMembers() if you're in battle. It only returns allMembers() if you're outside of combat.
 

Dungeonmind

Lvl 4000 Humanoid
Veteran
Joined
Sep 2, 2013
Messages
667
Reaction score
542
First Language
English
Primarily Uses
RMMZ
For future reference as well if you're not aware of this, you don't need to specify battleMembers() for something in battle; internally, members() already returns battleMembers() if you're in battle. It only returns allMembers() if you're outside of combat.

Thanks, I am. I just was giving a basic example of finding the actor information through a loop. How it's actually done is really up to him. The beauty of programming in my eyes, is that there is so many ways to do things and it's all a part of the BIG learning curve.
 

Latest Threads

Latest Profile Posts

…I’m not sure how much longer I’m going to be able to procrastinate on working on combat related stuff…
render000.png
been using old character designs I had from high school for npcs in my game. seeing as the original idea of my game was a comic, I've got a LOT of designs for characters sitting around. a lot of people aren't a part of the story anymore, so I'll make 'em npcs.
I am doing the evaluation of the feedback from the students who played my game and the comments are killing me. "it was good, we just did not have any smart trains of thought" xD
My goal this month will be to get back to organizing assets and make a prototype scene with multiple airships hovering or flying over the world map.

Forum statistics

Threads
128,526
Messages
1,195,212
Members
169,117
Latest member
pieman20
Top