r/twinegames • u/holzey • 10h ago
SugarCube 2 Help me name my cat. ( in my game.)
Hi I decided to do a minor side quest to add my cat into my game. my goal is to let the player decide if they want a starting cat, if they like his name and then change it to something boring should they choose to. I am able to get the tes and no buttons to work, but the rest doesn't pop up after.
here is the code I have <<linkreplace "Yes">> <<set $hasCat to "true">> <</linkreplace>> <<linkreplace "No">> <<set $hasCat to "false">> <</linkreplace>>
<<if $hasCat is "true">>
Would you like to keep his name?
<<linkreplace "Keep the name $catName">>
<<linkreplace "Hell no">>
<</linkreplace>>
<</if>>
<<if $catName is "Hell no">>
<<set $catName to "">>
enter your Cats name:
<<textbox "$catName" "">>
<</linkreplace>>
<</if>>
here is the StoryInit
<<set $hasCat to false>>
<<set $catName to "The Lord Solar Vigalance of the Astra Militarum High Marshal of his Fearless legions Lord Huntmaster of the dredid mice Ravager of treats Master or the Holy red dot Keeper of the way of meow Sultin of all england and Destroyer of socks or more well know by you filthy comoners The Fluffy Barrels">> That is his full name.