Conditional Branch: How many Party Members?

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
19
First Language
English
Primarily Uses
RMMV
As I'm working on my game, I basically want to implement dialogue that varies based on how many party members


are present.


For example, I want to rest at an inn and if my Party leader is alone, he'll say


"I wish to stay for the night."


But if he has at least one party member with him, he'll say


"We wish to stay for the night."


I just simply need to know the script code to put in the conditional branch.


Thanks.
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
$gameParty.members().length
 

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
19
First Language
English
Primarily Uses
RMMV
And where do I write the numeric value in?


Sorry if this is a dumb question.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
@Black Noise


Use a control variable: script command and put what mrcopra provided inside.


You'll then be able to check the variable in a normal conditional.


You could also do a conditional : script with


$gameParty.members().length === 1
//or
$gameParty.members().length > 1


Edit: Ah yes, almost everytime someone mentions a script call I forget what can be done with the basic commands...


Game data > other > party members


Indeed no use for a script call.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You don't need to use the script command for this.  Control Variables already gives you the party size, under Game Data.
 

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
19
First Language
English
Primarily Uses
RMMV
Thanks a lot.


This has really helped!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top