I've started working on my first visual novel, and I'm hitting my first issue :
I used a menu where a character has several options, and only one of these options is meant to let him advance in the story; and he gets back to the choice after some dialogue if he's chosen something else.
So far so good, I've already made it work :
But this got a bit trickier when I decided that the player shouldn't be able to select the same choice twice. I tried to follow this advice, but to no avail : I always have this error when I try to launch the game with these changes :
Here is my code, what am I doing wrong ?
Code: Select all
define u = Character(_("Great Cube of Ousia"),color="#BE150E" )
define a = Character(_("Anon"),color="#22628F" )
default chosen = set()
.
label start:
scene room
"Hmm, morning already. Seems like I have to get up soon. But how soon ?
maybe I still have time to sleep a little."
"I stand up and look for my phone, when..."
show cube1
u "Hi !"
a "AAAAAAAAAHHHHH"
"A big red levitating Cube materializes itself before me"
u "Wowowow, calm down ! Are you okay ?"
a"What the fuck, what the f*ck, what the..."
u "Ok, I get it, I startled you... I'll just wait over there for you to collect your thoughts, ok ?"
hide cube1
"And the cube disappears. I just seat there, half convinced that this was a dream.
My alarm rings. It doesn't seem like I'm waking up... Or maybe I had already woken up before realizing ? Any way, I gotta get up now."
"I stand up and open the door and..."
scene kitchen
show cube2
u "Oh, hey, did you calm down ?"
"I feel dizzy, but this time I don't scream."
u " Hello, I'm the Great Cube of Ousia, nice to meet you !
I'm guessing this is your first time meeting a transcendent, entity, you certainly have many questions, don't you ?"
menu choiceLoop1 :
set chosen
u "What would you like to know ?"
"What is a transcendent entity ?":
jump transcendent
"What are you doing in my apartment ?":
jump apology
"How can I help you ?":
jump quest
label transcendent:
a "You referred to yourself as a transcendent entity, right ? What exactly does it mean ?"
u "Oh, It's a word I came up with myself to convey how I perceive many more dimensions than your kind
and constantly travel through a dimension perpendicular to your time."
jump choiceLoop1
chosen.add("What is a transcendent entity ?")
jump choiceLoop1
label apology:
a "What are you doing in my apartment ?"
u "Oh, sorry, I guess it was rude of me to intrude... But I'd rather not be seen by to many other people, so I had to meet you here.
I really need your help, and I can help you in return !"
jump choiceLoop1
label quest:
u "So basically, in the far future, after humanity goes extinct, some chicken evolve convergently with both mesosoic theropods and humans.
They form a brilliant civilization, and they're beautiful. One of them in particular. Pukkipokov. I'm in love with her."
u "But at the time when she lives, her species have found out about the possibility of extradimentional threats and have erected barriers that
keep me from interacting with her."
u "But you see, Pukkipokov is a paleontologist, and she's gonna be digging not far from where you live.
If I were to engrave instructions addressed to her on how to summon me through the barrier and you were to bury it in the spot I tell you, she'd definitely find it !"
jump end
label end:
return