Character customisation and the selfie overlay


#1

Okay so this is driving me crazy. I found a thread in the old forum regarding it but it doesn’t look like it was resolved…

My script allows for character customisation and I’m trying to make it so that the skin tone on the selfie overlay matches the skin tone chosen in the beginning.

I’ve done by adding a gain to each skin tone and referencing them using if/elif/else later on like so:

choice
"Beige" {
@DAVID changes bodyColor into Beige
@DAVID starts idle_happy
goto boybodyColor_0
gain male_2
}

And so on…
Leading into…

if (male_2) {
INT. TAVERN - NIGHT with SELFIE MALE 2
@pause for a beat
} elif (male_4) {
INT. TAVERN - NIGHT with SELFIE MALE 4
@pause for a beat
} else {
INT. TAVERN - NIGHT with SELFIE MALE 5
@pause for a beat
}

At first I thought this would work–it saved without errors–however when I’m testing it is skipping straight to the else option.

I’ve given some of the skin tones the same gain [for example, grouping the lighter skin tones to MALE 2 and the darker ones to MALE 5]. Is this the issue?

Toying with the option of using points but I feel as though if I add them where I’ve added the gain (label) it will tally points whenever a player tests a colour rather than when they actually select it?

Does anyone have any ideas?


#2

@bouncymouse,

You need to put the gain before the goto because with it being after, the program can’t grab the gain. Also make sure your if is consistent with your gains. Otherwise your code should work.


#3

@bouncymouse I hope this works! Please let us know of the outcome. :smiley:


#4

When you do the if/else your supposed to make sure that you have both curly brackets and I think your forgetting a label. With light the label it won’t work correctly.


#5

Thank you so much!


#6

As far as I can see when I’ve tested it, it’s working :slight_smile:

Still trying to get my head around what order things need to be in when coding. A lot of trial and error :laughing:


#7

Glad this was resolved! Closing thread :v:t2:


#8