Script Call For Recognizing Party Members In Slots 1-4

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
Hey everyone, I'm looking for a solution to an specific issue that is sort of pivotal to the flow of my game.

Basically, there are various missions you can go on, but the missions available sometimes depend on who's in the immediate party. The issue I'm running into, is that there are 10+ playable characters in the game. But I only want to count the first 4 members as officially being within the party. So the conditional branch for checking who's in the party is out of the question.

The only consistent way I've gotten it to work, is by setting up a value with gamedata, that checks for the actor in slot 2. This would be fine but it's just kind of unnecessarily specific. And in order to check for all 4 slots, I'd have to make giant common event loops for.

So is there any possible way to use a script call for recognizing/checking the first 4 slots actor ID's?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
generalizing,....

[A,B,C,D] ∩ [A,B,C,D] = [A,B,C,D]

[A,C,E,G] ∩ [A,B,C,D] = [A,C]

you can check for

[array] ∩ [A,B,C,D] == [A,B,C,D]

unless, you want something different.
that's what I understand from the question.
by using array-specific functions, you don't check sequentially, but the whole array at once.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
Glad to know it's possible. The equations themselves make perfect sense! Sadly, I have no scripting knowledge by any means. So help with actually forming the script call with appropriate terms would be greatly appreciated!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
If you just want to know "is Actor 6 in the battle party" (as the "battle party" is the first 4 members) you can do

$gameActors.actor(6).isBattleMember()

Put this in the Script line of a conditional branch, and the condition will evaluate to true if actor 6 is in the first 4, or false if they are later in the lineup or not in the party at all.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
Hey, that works perfectly! Thanks so much!
 

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,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top