Multi Check Conditional Branch?

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
I asked this before, about items, and I had a work around if long and annoying but I'd like to see if I can get some advise about this. If this needs to be moved to script request, I'm sorry just asking for ideas or pointed in the right section.

What I'm trying to do is rig up a small 'quip' common event after moving a certain number of rooms. But right now the order of joining is randomized so I'm not sure who'd be in the party. And then check to see if that Flag has already fired and not do it again. This however makes for a huge nested list of


If Anna in party Then
If RecruitCount(total partymembers) is = > 2 then
If AnnaFlag on then
else
end
else
end
else
end

Is there a script command that would allow me to check off multiple things at once and proceed accordingly?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
509
Reaction score
196
First Language
english
Primarily Uses
RMMV
are you wanting 1 line of dialog based on who is leading that party? or 1 each for all members of the active party? (if its the 1st answer you only need to check for member #1)

set variable: Var A: game data: party: member #1
if variable = 1
> actor 1 dialog
if variable = 2
> actor 2 dialog
...
set variable: Var A: game data: party: member #2
if variable = 1
> actor 1 dialog
if variable = 2
> actor 2 dialog
...

there is no "else" branches
and the 1 variable is doing all the jobs of the
"is anna in party", "switch on: anna in party", "switch on anna already spoke"
"is brad in party", "switch on.......
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,204
Reaction score
428
First Language
indonesian
I asked this before, about items, and I had a work around if long and annoying but I'd like to see if I can get some advise about this. If this needs to be moved to script request, I'm sorry just asking for ideas or pointed in the right section.

What I'm trying to do is rig up a small 'quip' common event after moving a certain number of rooms. But right now the order of joining is randomized so I'm not sure who'd be in the party. And then check to see if that Flag has already fired and not do it again. This however makes for a huge nested list of


If Anna in party Then
If RecruitCount(total partymembers) is = > 2 then
If AnnaFlag on then
else
end
else
end
else
end

Is there a script command that would allow me to check off multiple things at once and proceed accordingly?
in conditional branch event command >> 4th tab >> there's a script function.
just translate all your condition to script... you can set multiple condition as long it return true or false.
for example your Anna in party let's say it's actor 4 in database could translate to:
Code:
$gameParty.members().includes($gameActors.actor(4))
use && for multiple condition...
for example RecruitCount might be variables let's say it variable 2... so your code will become
Code:
$gameParty.members().includes($gameActors.actor(4)) && $gameVariables.value(2) >= 2
then i assume the AnnaFlag is switch that set to on... let's assume it's switch 7
so the final condition script will be
Code:
$gameParty.members().includes($gameActors.actor(4)) && $gameVariables.value(2) >= 2 && $gameSwitches.value(7)
hope this help.
 

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
are you wanting 1 line of dialog based on who is leading that party? or 1 each for all members of the active party? (if its the 1st answer you only need to check for member #1)
Lemme try to run down a possible example;

You pick Anna at the start(Actor 2) and walk around, changing from room to room, map to map for a bit.
{Counter is ticking up but does nothing as it reads only 1 party member}
Anna eventually meets up with Lila(Actor 3) and she joins the party.
{Counter can NOW do something as it reads "2 party members" or Recruit Variable is 2 or higher}
The talk scene procs. Anna and Lila have a short talk about things and move on.
{Counter reached say 25, and resets. Run; Anna and Lila Talk text box. Mark that said talk happens}
Proceed as normal.

The problem is I'm running into
If Interaction is 25 do
Roll Number
If Number is 1
If Anna is in Party/Or Chosen as Leader do
If Other Party members are in Do

And then part of that is wrapped up in a bundle of "If you have Already Done this Event, Do this instead aka Skip".
What I'm picturing is a more random version the Tales of Series Skits. But at the same time being able to figure out how to scan for multiple conditions without having to use so many If than branches should be something to learn.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Officially not a mod anymore. Thanks for the many years!
Thinking if i should post on the classifieds section...
Made another plugin showcase video! :kaojoy:
(Plugins and details inside the description of the YouTube video.) :LZScheeze:
Ami
Castle is my Biggest Fear :kaodes:. I just Managed make Part by Part (like the Entrance only),not the Entire Castle like in the RM Sample...
This video really speaks to me...

Forum statistics

Threads
104,372
Messages
1,005,902
Members
135,892
Latest member
Duskpyx
Top