Where does variable creation belong?


#1

Hey! I’m new to the forum and glad to be here. I’m also brand new to coding choice games and I’m having a bit of trouble. I read said somewhere on the forum that you should create variables in mygame.js, not startup.txt. Is this true, and if so, how is it done?

Sorry for the dumb question, I’m just confused!


#2

That post is extremely outdated, you create them in startup.txt now. Just put *create variablename value. If it’s a number it has to be a numerical value, and if it’s text you need quotes, but you don’t have to put anything in them.

So

*create charactername ""

Would create a variable called charactername. You can *set the variable whenever you want in game. Just remember to use quotes for text variables, also known as “strings.”


#3

Oh, awesome! Thank you!