Help with points system

Hello. I have a points system that dictates the main characters personality. There are 3 personality options which are Heartfelt, Assertive, and Laid Back. The current if else statement isn’t working to choose the LaidBack personality. How do I code an if/else statement that is comparing 3 variables?

Below is the code that I currently have. It automatically defaults to HeartFelt if Assertive is at 0.

if(HEARTFELT > ASSERTIVE & LAIDBACK){

readerMessage Because of your Heartfelt personality

}elif(ASSERTIVE > HEARTFELT & LAIDBACK) {

readerMessage Because of your Assertive personality

}
else{

readerMessage Because of your Laidback personality

}

1 Like

@Dara.Amarie @Jade.epi @JemU776

1 Like

I think if you want to give them some feature you need to use gain like
gain Heartfelt

and then

if (Heartfelt)

The MC’s personality is based on the user choices. Based on user choices is whether or not the character becomes Heartfelt, Assertive, or Laidback.

So the personality of the MC can change throughout the episode, so a gain wouldn’t work.

I need to be able to compare the points between the scores to determine the outcome. I understand how to do that with two personalities, but not 3.

i could be wrong, but I don’t think it will let you have multiple conditions (if X and Y) for points. you can with flags though. you could nest your statements so they start with one comparison (heartfelt vs assertive, heartfelt vs laidback, assertive vs laidback) that contains other statements/comparisons inside each respective bracket to get the exact comparison you wanted

1 Like

Thanks. I’ll give this a try.

1 Like

Then you need to create three characters as in Heartfelt, Assertive, and Laidback. And give them points. After that you can use point system like,
if (Heartfelt<2) {

}

I understand that. I need to compare all 3 points to see which is greater.

For example I need how to do

if ( Assertive is greater than LaidBack AND Heartfelt)

The method you’re using used to work a while back.
However, it doesn’t anymore.
The only way to get the result you’re looking for is to use multiple if/ elif/ else’s inside if/ elif/ else’s.

1 Like

Thats frustrating. Thanks for letting me know.

Do you have an example of how that would be done with multiple if statements?

This should work :blob_hearts:

if (HEARTFELT > ASSERTIVE) {
if (HEARTFELT > LAIDBACK) {
NARRATOR
If the character has more heartfelt points, this is the scene they’ll get.

}} elif (ASSERTIVE > HEARTFELT) {
if (ASSERTIVE > LAIDBACK) {
NARRATOR
If the character has more assertive points, this is the scene they’ll get.

}} elif (LAIDBACK > HEARTFELT) {
if (LAIDBACK > ASSERTIVE) {
NARRATOR
If the character has more laidback points, this is the scene they’ll get.
}}

1 Like

@Dara.Amarie Hola chicos del episodio quiero saber como poner la opción que el lector lea la historia en ingles o español como lo han hecho Esli Genn en la historia llamada Agente Z7, si alguien quiere explicarme estaré muy agradecida, dara si tu sabes quien podria orientarme con este tema porfavor ayudame,

Thank you soo much! I’ll give this a try! and I’ll let you know if it works!

1 Like

By using gains and branching.
In the beginning of the first episode have a choice asking if they’d like to read in English or Spanish and incorporate a gain.
Like this:

NARR
Would you like to read this story in English or Spanish?

choice
“English”{
gain English

}“Spanish”{
gain Spanish

}

Then add an if/ else
Like this:

if (English) {
#The story with English dialogue will go here.

} else {
#The story with Spanish dialogue will go here.
}

Basically add a choice asking the reader if they’d like to read in English/ Spanish that gives them a gain. Then use that gain in an if/ else and just copy and paste the script changing the dialogue based on whether they chose English or Spanish dialogue.

If you want to just ask the reader only once what language they want the dialogue in the first episode, then use the if/ else without the choice after the first episode like I’ve shown above.

If you want to just ask the reader what language they want the dialogue in every episode. then change the gain number in every episode.

Like this: Episode 2

NARR
Would you like to read this story in English or Spanish?

choice
“English”{
gain English_2

}“Spanish”{
gain Spanish_2

}

Then add an if/ else
Like this:

if (English_2) {
#The story with English dialogue will go here.

} else {
#The story with Spanish dialogue will go here.
}

ok maybe u can give me and example cause i have do it but the text is still in spanish cause its my first lenguage

i mean like how to put it in the text i mean for each dialogue im new at this but ill be very grateful for all the help

ok so i did it but using the first one code mode and i click to read on english that first line and is totally working but when i choose sapnish it still keeps like english and if u can maybe do me and example please cause i really dont know what more to do or how position it :grimacing: :hugs:

You need to reset story progress or go to story modifiers, flags and any gold coloured buttons are the gains you have picked up, just click any gold ones to unselect them and update your script, it should work :blush:

1 Like

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