I require assistance... How do I put scenes in scene navigator and stats in stats in mygame.js?


I have just started creating my first Choicescript game. I currently have a startup scene, a Chapter 1 scene (no code yet), and a stats screen. I tried to execute a random test but it took an unbearable amount of time. Here is the code:
The sands of the wastes sweep across the horizon, as an owl would sweep over a rat with talons at the ready. The heat of the sun beats down upon you. Though rest but a second and the guard will fracture your finger as incentive.

(More description)


(Text for story)

*page_break The worker next to you notices… (Et cetera)


Is this person a Man or Woman?

*label sc1



__*set sc1_hisherc “His”

__*set sc1_genderc “Man”

__*set sc1_heshec “He”

__*set sc1_himherc “Him”

__(same except lowercase letters)

__Okay, so the person looking at your hammer is a ${sc1_genderl}. Got it.

__*goto sc1_2


(Same variables except female)

*label sc1_2

Do you know this ${sc1_genderl}'s name?



__This ${sc1_genderl}'s name is…

___*input_text sc1_name

____Okay, so {sc1_hisherl} name is {sc1_name}. Well ${sc1_heshel} certainly seems concerned.

____*goto agemchar


__{sc1_heshec} is nameless. At least to you. {sc1_heshec} certainly seems concerned about your cracked tool.

___*goto agemchar

*label agemchar

How old are you currently?



__*goto mchargender


__*goto mchargender


__*goto mchargender


__*goto mchargender


__*goto mchargender

_#I don’t remember…

__agemchar = rand 15 65

_#None of these are my age.

__*goto input_age

*label input_age

_input_number agemchar

__So you are ${agemchar} years old?



_____*goto mchargender


_____*goto agemchar

*label mchargender

Are you Male or Female?


_#I’m Male.

__*set sexmchar “Male”

___So you are a guy. Understood.

____*goto mcharname1

_#I’m Female.

__*set sexmchar “Female”

___So you are a woman. Understood.

____*goto mcharname1

*label mcharname1

What is your first name?

_*if (sexmchar = “Male”)



____*goto mcharname2


____*goto mcharname2


____*goto mcharname2

___#None of these are mine.

____*goto input_first

(Et cetera female versions. I do apologize for the lack of detail but I lack an Internet connection currently and I am using my iPhone to Input this message.)

Okay, so your name is ${mcharname1}?



__*goto mcharname2


__*goto mcharname2

*label mcharname2

_Okay what is your last name, ${mcharname1}?


(Last name variables etc.)

__Okay, so your full name is {mcharname1}_{mcharname2}?



_____*goto_scene Chapter1


_____*goto mcharname1



*label stat_chart

_Name: {mcharname1}_{mcharname2}


_Gender: ${sexmchar}


_Age: ${agemchar}


_opposed_pair Ruthless


_opposed_pair Aggressive


_opposed_pair Deceitful


_opposed_pair Dictatorial



_percent ${sc1}

_percent ${sc2}

_percent ${sc3}

_percent ${sc4}

_percent ${sc5}

_percent ${sc6}

Mygame - Notepad

nav = new SceneNavigator([“startup”, “Chapter1”]);stats = {Name: “???”, Gender: “???”, Age: “???”, Ruthless: “50%”, Aggressive: “50%”, Deceitful: “50%”, Dictatorial: “50%”};

I will appreciate any help anyone can offer. Many thanks XD


Well for a start you don’t need to add:

*line break

On the paragraph, simply enter and that will break the paragraph.

I don’t think

*line break

is necessary after


Also refer to IDE https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html Can help you see whatever error you might accidentally done or as a reference.

and well use a Notepad++ than Notepad :stuck_out_tongue:


to post code here use
< pre> Do not put space in before the pre.
< /pre> Again no space.


I might be confused in what you’re asking for, but anyway, I don’t think you need to mess with mygame.js anymore. For the scenes, just put them under the title. Stats go in choicescript_stats file (which needs to have that name)

So, pretty much, the very top of startup should look like.

*title Blah


and for choicescript_stats

     text ${mcharname1}_${mcharname2}
     text ${sexmchar}

*line_break isn’t necessarily needed in choicescript_stats between stats. If you want it to be separate than other information then just add another *stat_chart

Also, notepad++ is preferable, as well as free and has plugins, and I find quicktest to be a bit nicer than random test :slight_smile:


Thank you all for the reply. :smiley:

Aera- Ah ok. I just assumed that pressing enter did nothing haha. Now I get it.
Lordirish- I’m not sure I understand… Is that for highlighting the code?
Babisko-Okay, got it XD. I’ll let you guys know if it works, one moment please.


@SolemnSirSalvo the < pre > < /pre > that Lordirish mentioned is for what I did in my post, the *scene_list and *stat_chart thing, so that it formats in an easier way to convey to coders and all. :slight_smile:


Much appreciated. Alright I got rid of the [enter]s on every part of the code except the text shown in the story. I deleted the stats I inputted into the mygame.js as well as only leave startup in the SceneNavigator. Unfortunately I tried to try it out on windows script host and there’s an error saying on line 1 character 1 the SceneNavigator is undefined. Error code: 800A1391?


You may want to replace the file with a new one, just in case when you deleted the stats and didn’t end up accidently messing up something else.


Which file?


Wait, never mind! I’ve had a breakthrough! I was trying to play the game itself with the wrong file. Haha I thought you actually USED mygame.js AS the player :D. I think I have it set from here, I thank all of you! XD