What I would like to ideally have whenever there was a page-break, would be variable controlled text instead of simple block text … does anyone know if this is possible?
Currently (according to the wiki) I can customize the text in a Next button but not have variable text in its place.
So currently:
Example
*page_break [i] this text can be italized or bolded [/i]
...
Ideally, I would like:
Example
*page_break
*if (superhero)
The Justice Leage is calling out for your help!
*elseif (villain)
Joker's Assylum is reaching out to you for neferious planning.
*else
The Police Commissioner is pleading with you to stay off the streets.
My goal here is to keep the reader engaged with my story by being an active choice maker instead of a passive passenger floating from one page to the next…
*temp next_button ""
*if (superhero)
*set next_button "The Justice Leage is calling out for your help!"
*elseif (villain)
*set next_button "Joker's Assylum is reaching out to you for neferious planning."
*else
*set next_button "The Police Commissioner is pleading with you to stay off the streets."
*page_break ${next_button}
Sincerely I don’t understand what do you want. Do you want to make the text of the page_ game variAble in the base of choices?
Edited I am blunter
*if x
*page_break text
*if (superhero)
*page_break The Justice Leage is calling out for your help!
*elseif (villain)
*page_break Joker's Assylum is reaching out to you for neferious planning.
*else
*page_break The Police Commissioner is pleading with you to stay off the streets.
Does each page go a different place in the same scene or a different scene?
*if (superhero)
*page_break The Justice League is calling out for your help!
*elseif (villain)
*page_break Joker's Asylum is reaching out to you for neferious planning.
*else
*page_break The Police Commissioner is pleading with you to stay off the streets.
Ignore the extra tabs. On my phone and doing the code is a pain so just copied your text mostly and added the *page_break bits.
Just found out you can actually use variables for labels now.
Just tried the code below and it worked.
*title template for code
*author Sam Kabell
*comment your code goes here
*create superhero false
*create villain false
*create text "Hello"
*label test_scene
Hello?
*fake_choice
#"Hello."
*set text "Hello"
#"Hola."
*set text "Hola"
#"Hello there."
*set text "Hello there"
Could you repeat that?
*page_break ${text}
Hello
*finish
Alternatively, you can also use multireplace. Sometimes I use a number variable alongside a boolean solely for the ease of multireplace.
If you need to do this a lot, I’d suggest:
*if (superhero)
*set var 1
*elseif (villain)
*set var 2
*else
*set var 3
*page_break @{var I am a superhero.| I am a villain.|I am neither a superhero or a villain.}
And then you still have superhero and villain as booleans. You just need to remember the order.
Don’t forget the closing tag. This might work in most cases, but you run the risk of italics extending past the expected point if you don’t explicity close it.
To close the tag, it’d be ${( "[i]" & var ) & "[/i]"}. I didn’t really bothered before, but now I know that the logic inside the brackets is practically the same as for the *if command.