# How do I start a scene in choicescript code?

**URL:** <https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801>\
**Category:** General\
**Created:** [June 3, 2015, 3:47am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801 "2015-06-03T03:47:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![asalh](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/asalh/32/198974_2.png) [@asalh](https://forum.choiceofgames.com/u/asalh)\
**Post date:** [June 3, 2015, 3:47am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/1 "2015-06-03T03:47:04Z")

</div>

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?

Bryan

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [June 3, 2015, 3:49am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/2 "2015-06-03T03:49:58Z")

</div>

I suggest you check this out

> **[Setting up ChoiceScript](https://choicescriptdev.fandom.com/wiki/Setting_up_ChoiceScript)**
>
> This article is aimed at beginners to ChoiceScript. However, if you have not already done so then the best place to start would be with the very first article in this Introduction To ChoiceScript Game Development series of linked articles: A Basic...

---

<div class="post-metadata">

**Author:** ![asalh](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/asalh/32/198974_2.png) [@asalh](https://forum.choiceofgames.com/u/asalh)\
**Post date:** [June 3, 2015, 3:54am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/3 "2015-06-03T03:54:53Z")

</div>

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

\*scene\_list  
Fantom  
Night

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?

---

<div class="post-metadata">

**Author:** ![asalh](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/asalh/32/198974_2.png) [@asalh](https://forum.choiceofgames.com/u/asalh)\
**Post date:** [June 3, 2015, 3:58am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/4 "2015-06-03T03:58:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [June 3, 2015, 4:08am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/5 "2015-06-03T04:08:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cecilia\_Rosewood](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cecilia_rosewood/32/253835_2.png) [@Cecilia\_Rosewood](https://forum.choiceofgames.com/u/Cecilia_Rosewood)\
**Post date:** [June 3, 2015, 4:11am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/6 "2015-06-03T04:11:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FoxalypticWorld](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/foxalypticworld/32/264486_2.png) [@FoxalypticWorld](https://forum.choiceofgames.com/u/FoxalypticWorld)\
**Post date:** [June 3, 2015, 4:13am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/7 "2015-06-03T04:13:53Z")

</div>

> [@asalh](#):
>
> Do I use \*Night or \*create Night, etc?

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.

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [June 3, 2015, 4:18am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/8 "2015-06-03T04:18:12Z")

</div>

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

[Wiki](http://choicescriptdev.wikia.com/wiki/A_Basic_Tutorial)  
[CoG tutorial](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/)

---

<div class="post-metadata">

**Author:** ![asalh](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/asalh/32/198974_2.png) [@asalh](https://forum.choiceofgames.com/u/asalh)\
**Post date:** [June 3, 2015, 4:20am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/9 "2015-06-03T04:20:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cecilia\_Rosewood](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cecilia_rosewood/32/253835_2.png) [@Cecilia\_Rosewood](https://forum.choiceofgames.com/u/Cecilia_Rosewood)\
**Post date:** [June 3, 2015, 4:26am UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/10 "2015-06-03T04:26:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cvaneseltine](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cvaneseltine/32/4047_2.png) [@cvaneseltine](https://forum.choiceofgames.com/u/cvaneseltine)\
**Post date:** [June 3, 2015, 1:28pm UTC](https://forum.choiceofgames.com/t/how-do-i-start-a-scene-in-choicescript-code/9801/11 "2015-06-03T13:28:08Z")

</div>

> [@asalh](#):
>
> 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.

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.
