Point system choices help!

I’m writing a school story and I tried to kind of do an exam with choices, having correct and wrong answers that lead to certain grades.
I was able to do the exams choices by creating characters with the names for each discipline, something like-- “Literature +1”, so that I could be able do make different outcomes depending on points.
However my script doesn’t work when I use “if, elif and else” to make different outcomes, it simply doesn’t work at all or some of the outcomes don’t.
So if someone could hep I would appreciate it! Thanks!

2 Likes

Could you send the script?

we need to see your script first. :slight_smile:

choice [timed:center:6:Michelangelo]
“Leonardo da vinci”{
@pause for 3
} “Michelangelo” {
@pause for 3
} “Shakespeare” {
@LITERATURE CLASS GRADE +1
@pause for 3
}

@speechbubble is 161 240 to 108% with tail_top_left
NARRATOR
Who was the first published female author?

choice [timed:center:6:Julian of Alpes]
“Julian of Norwich”{
@LITERATURE CLASS GRADE +1
@pause for 3
} “Julian of Alpes” {
@pause for 3
} “Julian of Irish” {
@pause for 3
}
@speechbubble is 161 240 to 108% with tail_top_left
NARRATOR
Which one is not a type of literature?
choice [timed:center:6:Poetry]
“Drama”{
@pause for 3
} “Fan-Fiction” {
@LITERATURE CLASS GRADE +1
@pause for 3
} “Poetry” {
@pause for 3
}

This are the outcomes

if (LITERATURE CLASS GRADE = 0) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a D!
@LILY is idle_sad_timid_loop
@pause for a beat
} elif (LITERATURE CLASS GRADE = 1) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a C!
@LILY is idle_awkward_uneasy_loop
@pause for a beat
} elif (LITERATURE CLASS GRADE = 2) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a B!
@LILY is react_pumpfist_happy
@pause for a beat
} elif (LITERATURE CLASS GRADE = 3) {
@speechbubble is 159 244 to 111%
NARRATOR
You had aN A!
@LILY is react_claphands_happy
@pause for a beat
}

This is my second choice and outcomes:

choice [timed:center:6:Rose leafs]
“Wheeler leafs”{
@HERBOLOGY CLASS GRADE +1
@pause for a beat
} “Sunflower leafs” {
@pause for a beat
} “Rose leafs” {
@pause for a beat
}
@speechbubble is 174 142 to 115% with tail_top_left
LILY (think_rubchin)
(Next I need to mix a bit of…)

choice [timed:center:6:Wolf Blood]
“Wolf Blood”{
@pause for a beat
@pause for a beat
} “Fairy Blood” {
@pause for a beat
} “Unicorn Blood” {
@HERBOLOGY CLASS GRADE +1
@pause for a beat
}

choice [timed:center:6:Ruby Shard]
“Ruby Shard”{
@pause for a beat
} “Diamond Shard” {
@pause for a beat
} “Crystal Shard” {
@HERBOLOGY CLASS GRADE +1
@pause for a beat
}

Again the outcomes
if (HERBOLOGY CLASS GRADE = 0) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a D!
@LILY is idle_sad_loop
@pause for a beat
} elif (HERBOLOGY CLASS GRADE = 1) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a C!
@LILY is idle_awkward_uneasy_loop
@pause for a beat
} elif (HERBOLOGY CLASS GRADE = 2) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a B!
@LILY is react_claphands_happy
@pause for a beat
} elif (HERBOLOGY CLASS GRADE = 3) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a A!
@LILY is react_pumpfist_happy
@pause for a beat
}

And finally I have this third option:

choice [timed:center:6:Anthony Wilson]
“Anthony Wilson”{
@pause for a beat
} “Jean-Claude Pierre” {
@HISTORY OF SUPERNATURAL GRADE +1
@pause for a beat
} “Peter Steveson” {
@pause for a beat
}

@speechbubble is 161 226 to 113%
NARRATOR
Where was the first vampire turned?

choice [timed:center:6:India]
“Egypt”{
@HISTORY OF SUPERNATURAL GRADE +1
@pause for a beat
} “France” {
@pause for a beat
} “India” {
@pause for a beat
}
@speechbubble is 161 226 to 113%
NARRATOR
What’s the name of the first vampire wife?

choice [timed:center:6:Vera Pierre]
“Julianne Pierre”{
@pause for a beat
} “Camille Pierre” {
@HISTORY OF SUPERNATURAL GRADE +1
@pause for a beat
} “Vera Pierre” {
@pause for a beat
}

if (HISTORY OF SUPERNATURAL GRADE = 0) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a D!
@LILY is idle_sad_loop
@pause for a beat
} elif (HISTORY OF SUPERNATURAL GRADE = 1) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a C!
@LILY is deepbreath
@pause for a beat
} elif (HISTORY OF SUPERNATURAL GRADE = 2) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a B!
@LILY is react_holdface_happy
@pause for a beat
} elif (HISTORY OF SUPERNATURAL GRADE = 3) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a A!
@LILY is react_holdface_happy
@pause for a beat
}

I’m sorry if it’s too much, but if you could help me with at least one choice I would really appreciate! :hugs:

I have posted it, hope you can help me! :blush:

OK I have tested the first one and seems everything is right…havent you just forgot to refresh the page after you have made the choice?

Since preview remembers the gained points and if you replay without refreshing it will then not start on 0.

You can also use story modifiers for the testing so you do not need to refresh and replay all all the time.

1 Like

Is the characters you created for it called LITERATURE CLASS GRADE and HERBOLOGY CLASS GRADE? Just because before you had only said literature without the class grade which I don’t think you need if that’s not the character name

I also recommend using else at the end choice instead of elif

When I refresh, I don’t understand why but “if” outcomes work, which is great so thanks!
But the option “…”=0 it doesn’t work.

Yes “LITERATURE CLASS GRADE” and “HERBOLOGY CLASS GRADE” are the characters names. I tried to put “else” instead of “elif” as you said and resfresh , but it still didn’t work for the option “…”=0.

1 Like

in all or just in one specific?

yhave you used this point anywhere before this choices?

Maybe tryjust above the choice add
@POINT = 0 for all the point systems

This way the script will read the points… it sometimes has problem to show the points if the storiline of reader never mett this character so put it above it so every reader no matter of his path will get the character “registred”… dunno how to explain it better :woman_facepalming:

Have you checked the points in the point system part of the navigation in preview each time you answer a question? Maybe they’re not adding up for some reason… tbh at this point I’m not really sure :woman_shrugging:

In all. No I’ve only added this point for the first time when I made the choice.
I tried to do " @LITERATURE CLASS GRADE = 0" before the choice but it says that’s not a valid command. :pensive:

Every time I try the choices, I reset the progress so it doesn’t glitch/get confused when I try different outcomes… But nothing has worked. I’m not sure why because I’ve used if choices in the past and worked.

1 Like

Did you make sure to reset your points before trying again? Otherwise they keep adding points and it may overcome your limit

Maybe try naming the choices? So like:

choice (Poetry) [timed:center:6:Poetry]

Then have all your choices folloing that

I’m not too sure, but maybe you can try deleting the space after the ‘=’ sign, so there is no space between the equal sign and the number? I usually have issues with spaces so I toggle them around a bit to see if they’re the issue.

Another thing that might help is creating a label and using goto (This can be confusing at first if you don’t know it already, but a label is simply naming a certain piece of code and think of goto as go to [the name of the label] When using the goto command, the word 'label is not needed. Lmk if you need more information about labels and gotos :blob_sun: ) . For example, before the outcome for literature class, which is this piece of code:

if (LITERATURE CLASS GRADE = 0) {
@speechbubble is 159 244 to 111%
NARRATOR
You had a D!

:blob_hearts: Create a label. You can name it label literature_outcomes (or anything you want. Keep in mind that label names cannot have spaces.)

Then after the choices for literature class, which is this piece of code:

choice [timed:center:6:Ruby Shard]
“Ruby Shard”{
@pause for a beat
} “Diamond Shard” {
@pause for a beat
} “Crystal Shard” {
@HERBOLOGY CLASS GRADE +1
@pause for a beat
}

:blob_hearts: Write goto literature_outcomes . So it directs it to the piece of code. You’ll need to create new labels per class. I hope it worked. Please tell me how it goes so I can help you further is it doesn’t :llama:
Sorry, this is a bit wordy :sweat_smile:
P.S. I’m not sure if I helped the correct problem, but I hope what I said helps

I’ve done it. I reset everytime I try my choices however it keeps failing… :sleepy::sleepy:

I tried this! But I don’t know if it cause I don’t understand a lot about labels but it didn’t work. This is how I wrote:

label literature_outcome

Choice [timed:center:6:Michelangelo]

goto literature_outcome

if (LITERATURE CLASS GRADE = 0) {


}

When you wrote goto (label name), it will go to the start of that label. Right now, you are going back to the choice. Is that what you want?

Have you tried doing just one class (save the rest somewhere else) and see if that works. Then adding the other classes one by one.

1 Like

Try, switching it around, e.g.

Choice [timed:center:6:Michelangelo]

goto literature_outcome

label literature_outcome
if (LITERATURE CLASS GRADE = 0) {


}

So the goto code is at the end of the choice and the label code is at the beginning of the outcome. Labels are a way to ‘name’ a piece of code and goto is basically ‘go to’ LABELNAME, which basically means go to the piece of code which you labelled. How’d it go?