Why doesn't the point system work?

Hi everyone! I am coding a mini game in which there are two pictures on the screen and the player can tap on either one to view it (by using tappable overlays) but after viewing that particular picture, they cannot view it again. After viewing both the pictures an arrow appears on the screen and when the readers tap on it, they are transported to the rest of the story.
here is what the script looks like:

label first_set_of_photos
&speechbubble is 219 275 to 0%
if (PIC =12) {
goto arrow_tappable_turn_pic
} else {
continue
}
tappable
“PIC_1” {
if (PIC =0) {
@PIC =1
goto picture_1
} elif (PIC =2) {
@PIC =12
goto picture_2
} elif (PIC =1) {
@speechbubble is 219 275 to 78%
NARR
You have already watched this picture’s memory.
goto first_set_of_photos
} else {
@speechbubble is 132 252 to 74%
NARR
You have watched both the pictures please click the arrow :arrow_right: to proceed.
goto first_set_of_photos
}
} “PIC_2” {

}
label arrow_tappable_turn_pic
&overlay ARROW1 create AND overlay ARROW1 opacity 1
tappable
“ARROW1” {

}
label picture_1
NARR
Here is the scene of picture 1
label picture_2
NARR
Here is the scene of picture 2

The problem that arises here is that when I click on them in the previewer, it shows “You have watched both the pictures please click the arrow :arrow_right: to proceed.” (the line that is there in the else condition) I have checked that the point of “PIC” are 0 but still it is showing the else condition instead of what is written in the condition ‘if(PIC =0)’.

Can anyone please help me rectify it? Any help is appreciated.
-Love Infinity :blob_sun:

1 Like

If you are watching it on the previewer, you have likely already played through once so you have accrued all of the points. You need to reset it within your portal playthrough by going to Story Modifiers → Character Points → PIC → PIC 0.

1 Like

I already did that :pensive: It’s still not working, I don’t know what is wrong in it and it didn’t work in the first place.

Hmm, maybe before you enter the minigame, can you do @PIC= 0 and see if that works?

1 Like

Trying that


Okay, lemme know if it works!

now it is no longer tappable, nothing happens when I tap on it, whereas all I did was this:

@PIC =0
label first_set_of_photos
&speechbubble is 219 275 to 0%
if (PIC =12) {
goto arrow_tappable_turn_pic
} else {
continue
}
tappable
“PIC_1” {
if (PIC =0) {
@PIC =1
goto picture_1
} elif (PIC =2) {
@PIC =12
goto picture_2
} elif (PIC =1) {
@speechbubble is 219 275 to 78%
NARR
You have already watched this picture’s memory.
goto first_set_of_photos
} else {
@speechbubble is 132 252 to 74%
NARR
You have watched both the pictures please click the arrow :arrow_right: to proceed.
goto first_set_of_photos
}
}

Meaning all I changed was to add the @PIC =0 command

Honestly that doesn’t make sense haha
 Points should not effect a tappable command :sweat_smile:

1 Like

I know right! Is this a wierd episode bug? Should I send a ticket?? Plus this is not the first time that it has happened with me

I’m gonna try your code in my script, give me a few minutes!

1 Like

Thank you very very much! Btw do you suggest using gains in this script or should I just use the character points?

Can you post (or PM me if you don’t want to post it publicly) all of the relevant code, including the parts where the labels lead?

Also, I would use character points to do what you’re trying to do as well! But if it doesn’t work, you could give gains a shot.

1 Like

Hi! I actually refreshed the script again and it is now working again. Thank you very very much for your help!!!

1 Like

Glad to hear it!

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