Indinera

Indie Dev
Regular
Joined
Mar 13, 2012
Messages
2,547
Reaction score
1,281
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
Regular
Joined
Sep 2, 2013
Messages
697
Reaction score
582
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
Regular
Joined
Apr 12, 2012
Messages
6,853
Reaction score
7,894
First Language
English
Primarily Uses
RMMZ
JavaScript:
$gameParty.members().some(member => member.isDebuffAffected(7));
 

Trihan

Speedy Scripter
Regular
Joined
Apr 12, 2012
Messages
6,853
Reaction score
7,894
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
Regular
Joined
Sep 2, 2013
Messages
697
Reaction score
582
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 Posts

Latest Profile Posts

Time for the next chance for y'all to affect my advent calendar! Where should Day 7's sprite come from: land, sea, or demon realm? :rwink:
Throné's final boss is weird. He is a guy holding a baby while fighting off attackers. I think his name was Santos. I might be thinking of someone else.
I think I've just about finished fighting the fight with the tileset I was most intimidated by for game jam. No pictures yet, the map isn't presentable, but I think the tileset will work! I'm very relieved XD
Twitch! At it again with more gamedev for a couple hours, followed by some Valheim with my friend. Feel free to drop by~
these 80+ gb updates on several years old games are the absolute worst. I just want to play for an hour or so before bed to unwind. Sorry, gotta spend that time downloading an update. Then my mods will be broken so I'll have to start over or wait for those to be updated to. Is a complete game within three years of the pay to be a beta tester period really to much to ask?

Forum statistics

Threads
136,782
Messages
1,269,873
Members
180,522
Latest member
Reniawan
Top