HELP with CC code

so im doing a mash up of a lot @Dara.Amarie’s code and I am doing okay.
But im stuck on this one part: I’m trying to make it so is you chose the male MC and the Female LI they will both show up… This way i know that there paths are right

code screen shots


1 Like

I also dont know why the gain for MC_male isn’t working at all…

code


1 Like

Hi!
I’m not sure for the first part sorry as I didn’t 100% understand what you meant, but for why the (MC_male) isn’t working, I think it’s because you’ve got it as an ‘elif’ following on from the if/elif LI.

Make them seperate, like this;

if (LI_female){
@LICHARACTER1 walks to xyz
@LICHARACTER2 walks to xyz
}
elif (LI_male){
@LICHARACTER1 walks to xyz
@LICHARACTER2 walks to xyz
}

if (MC_male){
@MCCHARACTER1 walks to xyz
@MCCHARACTER2 walks to xyz
}
elif (MC_female){
@MCCHARACTER1 walks to xyz
@MCCHARACTER2 walks to xyz
}

this will allow both the LI gain and the MC gain to work together rather than competing.

I think the MC_male wasn’t working because it was following on from the LI gains. So the script is automatically directing you to the instructions under the LI gain (based on who you chose) therefore it wont continue onto the next gain which was the ‘MC_male’ and the else (being MC_female).

Hope this makes sense! :sweat_smile:

2 Likes

LOL yeah I am sorry I am confusing …
basically I have 4 routes

  1. female/ male
  2. Male/male
  3. female/female
  4. male/female

Screen Shot 2021-07-16 at 7.24.40 PM

I know 1 and 3 work but not 2 and 4

ALSO
I will try your way for my 2nd problem and I will let you know!

2 Likes

Just took another look!

It could be that the the use of ‘goto START_F_M’ is used twice.

Once under female_story_branch and once under male_LI_branch.

should it be;

label female_story_branch
#customistion template here…
goto START_F_M

label male_story_branch
#customistion template here…
goto START_M_M

label female_li_branch
#customistion template here…
goto START_F_F

label male_story_branch
#customistion template here…
goto START_M_F

2 Likes

ohhh yeah that could be it let me try that!
Give me one moment~!

2 Likes


so like this correct?

2 Likes

I think so,

if you have 4 branches, it would make sense to have 4 different labels for those branches, so it should work. Just double check you have the label relating to them matching the ‘goto’ so that they’re being directed to the right places :slight_smile:

1 Like

Screen Shot 2021-07-16 at 7.35.15 PM

yes I do it works great now

THANK YOU SO MUCH~

2 Likes

quick question what is the difference between using elif and if?

1 Like

Think of it as ‘this’ or ‘that’

So say you have 3 gains, ‘option_1’ ‘option_2’ and ‘option_3’

If (option_1){

}
elif (option_2){

}
else{

}

That basically means if you chose option_1 whatever is instructed in the first bracket will happen.

If you didn’t choose option_1 the script will bypass those instructions and it’ll check whether you chose option_2. If you did choose option_2 it’ll follow the instructions from the elif bracket.

If you chose option_3, then the script will bypass both the ‘if and elif’ brackets and follow the instructions in the else bracket.

All 3 can’t work at once, the script will only allow one.

So in your case, when you had all the Li and Mc gains under the same bracket branching, it wasn’t reaching the MC options because it was already following the instructions from the Li gain you chose under the first ‘if/elif’ in the brackets.

That’s why you had to separate them for them both to work.

Hope that makes sense :relaxed:

2 Likes

ohhh okay — yes it does make sense

:tulip: Thank you so much ~

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.