What are indented boxes?


#1

He guys, i’m thinking about making a game, but I still have to learn choice script. I need help with indented boxes. What are they? and how to use them?


#2

It’s where you use an tab or space to create a new line of options. You can do it however you like but it must be consistent.


#3

for e.g

*choice
#Kill myself
You kill yourself.
*finish


#4

There’s a wiki article on this specific subject:


#5

*choice
  #Pick me.
    Me.
    *goto myself

  #No pick me.
    Me 2.
    *goto yourself

*label myself

Blah blah blah
*finish

*label yourself

Yadda yadda yadda
*finish


#6

Thx, guys.


#7

Also, can u guys tell me that when i downloaded the choice script file and when i was reading the wikia article about “Setting Up ChoiceScript” it said that you file mygame.js will look like this :

nav = new SceneNavigator([

"startup"

,"animal"

,"variables"

,"gosub"

,"ending"

,"death"

]);

Whereas my file looked like this:

nav = new SceneNavigator([“startup”]);
stats = {};

Any help? I deleted then downloaded the game twice but the same thing. Plz help…


#8

@Dragonslayer Unfortunately, significant chunks of the Wiki are sorely in need of updating (guilty as charged - I’ve been kinda busy). You can safely ignore any mention of mygame.js, for instance, as you no longer need to touch that file nor worry about what it contains.

We’ll see about tidying up the Wiki over the next few days.


#9

@Vendetta Thank you very much! But how will the scene navigator progress? I mean how will it shift from one scene to another.


#10

@Dragonslayer That’s now been greatly simplified with the inclusion of the startup.txt file - everything that used to belong in mygame.js (a JavaScript file, so required a different layout and caused a lot of problems for new authors) now goes in startup.txt using a typical ChoiceScript layout.

If you look in the default startup.txt after downloading, you’ll see how scene files (for game navigation purposes) are now simply listed under the *scene_list command. ChoiceScript uses that list in exactly the same way it used to use the scene navigation one in mygame.js, so you simply list scenes there in sequential order for the *finish command to navigate through.