How do I start a scene in choicescript code?


Newbie here.

Hello all. I know this might sound odd, but when I start a scene in choicescript, what description or “code language” do I use to start the scene? In other words, by looking at the code, how do I know if a scene has started?



I suggest you check this out


Thanks Fantom, will do. I guess what I am saying is, if I write the following code.


When I start the Night scene, how do I know have started it? Do I use *Night or *create Night, etc? How do I know where the scene starts?


Or even more simply, what command do I use in my code to begin a scene?


Ah, I misunderstood. Well, first off Choicescript will always start with startup, which should also always be the first scene listed in *scene_list, and to go to another scene use either *finish at the end of a scene to automatically go to the next scene listed in *scene_list, or use *goto to go to a different scene.


Each scene is a separate .txt file, if that’s what you’re asking. It has to be called the same as the scene in the *scene_list

Edit: And, as @FoxalypticWorld mentioned, this .txt file has to be in the scenes folder.


The list of scenes you place in the *scene_list comes from your web > mygame > scenes folder. You’d make a scene within that folder labeled Night. Then you’d use *finish or *goto Night to head over to that scene, as fantom mentioned.


Do be sure to hit up the wiki and CoG tutorials though, they cover most topics.

CoG tutorial


Thanks guys. I believe I see what is happening here. In another programing language, a “scene” can be compared to a function. At the beginning of the function code. it is given a function name. It seems that in choicescript, you go into a scene when you list *choice. You do not know if the scene is over until you see *ending. Until I get more familiar with following the scenes, I can comment the scene names in. Choicescript goes from one scene to the next automatically as long as the scene is not ended. I will download and read the tutorial.


It sounds like what you call a scene and what choicescript calls a scene are two completely different things…
Oh well. Anyway, good luck with that.


This isn’t accurate. (The closest thing ChoiceScript has to functions is *gosub.) A scene in ChoiceScript is actually a separate file.

As @FoxalypticWorld explained, each scene exists in its own file. The system locates the various files based on the scene list in startup.txt.