# A question about choicescript

**URL:** <https://forum.choiceofgames.com/t/a-question-about-choicescript/66961>\
**Category:** ChoiceScript Help\
**Created:** [October 10, 2019, 8:16pm UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961 "2019-10-10T20:16:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zene-Zenon](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@Zene-Zenon](https://forum.choiceofgames.com/u/Zene-Zenon)\
**Post date:** [October 10, 2019, 8:16pm UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/1 "2019-10-10T20:16:52Z")

</div>

Hello guys. So i wanted to ask if there’s a code wich can allow you to go to a precise label in a different scene from the one you are in.

I was thinking something like that

We have two scenes dashingdon and forum.

```
Example
*choice
  #Go to dashindon's 4 label
    You will be redirected in a few seconds.
    *goto_scene [dashingdon (label 4)]

```

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [October 10, 2019, 8:31pm UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/2 "2019-10-10T20:31:46Z")

</div>

Yes there is more than one option in that regards.

```
*goto_scene scenename preciselabelname

```

and also subroutines!

```
*gosub_scene sceneName LabelName

```

I hope I helped! 😃

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [October 10, 2019, 8:42pm UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/3 "2019-10-10T20:42:26Z")

</div>

Look at This example:

```
You arrived in the Market of Othercity. (Descriptions...)
*set local "other"
*set price 0

What do you want to buy?
*fake_choice
  # Wine
    *set product "Wine"
  # Spices
    *set product "Spices"
  # Precious_stones
    *set product "Precious_stones"
  # Textiles
    *set product "Textiles"
  # Boomsticks
    *set product "Boomsticks"
  # Arms
    *set product "Arms"

*gosub_scene Prices [product]price

*line_break
The price for ${product} is:${price}. How many barrel do you want to buy??

Your money is: ${coins}

You have ${cargo_space} in your Airship.

```

And in the Prices.txt :

```
*label Wine_price

*if (local = "other")
  *set price (Attrib0*((base_price*mkt_rate)*finished_base))

*if (local = "Saar")
  *set price (Attrib0*((0*mkt_rate)*finished_base))
  
*if (local = "Faygard")
  *set price (Attrib0*((45*mkt_rate)*finished_base))

  
*if (local = "Costa Berde")
  *set price (Attrib0*((25*mkt_rate)*finished_base))
  
*if (local = "montainhomes")
  *set price (Attrib0*((70*mkt_rate)*finished_base))
  
*if (local = "Prince's City")
  *set price (Attrib0*((20*mkt_rate)*finished_base))

*gosub taxes
*return

*label Spices_price

*if (local = "other")
  *set price (Attrib0*((base_price*mkt_rate)*luxury_base))

*if (local = "Saar")
  *set price (Attrib0*((40*mkt_rate)*luxury_base))
  
*if (local = "Faygard")
  *set price (Attrib0*((100*mkt_rate)*luxury_base))

  
*if (local = "Costa Berde")
  *set price (Attrib0*((140*mkt_rate)*luxury_base))
  
*if (local = "montainhomes")
  *set price (Attrib0*((120*mkt_rate)*luxury_base))
  
*if (local = "Prince's City")
  *set price (Attrib0*((105*mkt_rate)*luxury_base))

*gosub taxes
*return

*label Precious_stones_price

*if (local = "other")
  *set price (Attrib0*((base_price*mkt_rate)*luxury_base))

*if (local = "Saar")
  *set price (Attrib0*((750*mkt_rate)*luxury_base))
  
*if (local = "Faygard")
  *set price (Attrib0*((1350*mkt_rate)*luxury_base))

  
*if (local = "Costa Berde")
  *set price (Attrib0*((1100*mkt_rate)*luxury_base))
  
*if (local = "montainhomes")
  *set price (Attrib0*((550*mkt_rate)*luxury_base))
  
*if (local = "Prince's City")
  *set price (Attrib0*((1000*mkt_rate)*luxury_base))

*gosub taxes
*return

*label Textiles_price

*if (local = "other")
  *set price (Attrib0*((base_price*mkt_rate)*luxury_base))

*if (local = "Saar")
  *set price (Attrib0*((150*mkt_rate)*luxury_base))
  
*if (local = "Faygard")
  *set price (Attrib0*((250*mkt_rate)*luxury_base))

  
*if (local = "Costa Berde")
  *set price (Attrib0*((350*mkt_rate)*luxury_base))
  
*if (local = "montainhomes")
  *set price (Attrib0*((110*mkt_rate)*luxury_base))
  
*if (local = "Prince's City")
  *set price (Attrib0*((170*mkt_rate)*luxury_base))

*gosub taxes
*return

*label Boomsticks_price

*if (local = "other")
  *set price (Attrib0*((base_price*mkt_rate)))

*if (local = "Saar")
  *set price (Attrib0*((1200*mkt_rate)))
  
*if (local = "Faygard")
  *set price (Attrib0*((300*mkt_rate)))

  
*if (local = "Costa Berde")
  *set price (Attrib0*((1100*mkt_rate)))
  
*if (local = "montainhomes")
  *set price (Attrib0*((700*mkt_rate)))
  
*if (local = "Prince's City")
  *set price (Attrib0*((1000*mkt_rate)))

*gosub taxes
*return

*label Arms_price

*if (local = "other")
  *set price (Attrib0*((base_price*mkt_rate)))

*if (local = "Saar")
  *set price (Attrib0*((210*mkt_rate)))
  
*if (local = "Faygard")
  *set price (Attrib0*((200*mkt_rate)))

  
*if (local = "Costa Berde")
  *set price (Attrib0*((260*mkt_rate)))
  
*if (local = "montainhomes")
  *set price (Attrib0*((180*mkt_rate)))
  
*if (local = "Prince's City")
  *set price (Attrib0*((240*mkt_rate)))

*gosub taxes
*return

```

What do you think?

Isn’t cool?

---

<div class="post-metadata">

**Author:** ![Zene-Zenon](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@Zene-Zenon](https://forum.choiceofgames.com/u/Zene-Zenon)\
**Post date:** [October 10, 2019, 10:40pm UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/5 "2019-10-10T22:40:18Z")

</div>

Thank you it helped me greatly 😌

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [October 11, 2019, 12:09am UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/6 "2019-10-11T00:09:02Z")

</div>

It’s a pleasure buddy! 😉

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [October 11, 2019, 3:52am UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/7 "2019-10-11T03:52:54Z")

</div>

The wiki might come in handy in case you want to take a peek at CS advanced feature. There’s also the Beginner’s master-list.

> **[ChoiceScript Wiki](https://choicescriptdev.fandom.com/wiki/ChoiceScript_Wiki)**

> [@Master List: Links for Beginners](https://forum.choiceofgames.com/t/master-list-links-for-beginners/21872):
>
> Since this gets asked a lot I thought I’d try and create a master list of links for beginners. If anyone wants to add links to the list please feel free to since I’m making this wiki format. [Start here for newcomers](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/)[The Wiki](http://choicescriptdev.wikia.com)[ChoiceScript Basic Tutorial](http://choicescriptdev.wikia.com/wiki/A_Basic_Tutorial) on wiki [RETowers’ Tutorial](https://forum.choiceofgames.com/t/the-beginners-guide-to-choicescript/9866) by @RETowers[Lglasser’s Tutorial](https://forum.choiceofgames.com/t/choicescript-full-tutorial-finished/16130) by @Lglasser Dedicated ChoiceScript Development Tools You do not need to download or update ChoiceScript when using either of these tools. [Chronicler](https://forum.choiceofgames.com/t/tool-chronicler-choicescript-visual-code-editor/6811) Visual Code Editor by @Ben…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/choiceofgames/original/3X/e/f/efe1497a762edecdb6d569a1c4abee87508bf002.png) [@system](https://forum.choiceofgames.com/u/system)\
**Post date:** [October 12, 2019, 3:52am UTC](https://forum.choiceofgames.com/t/a-question-about-choicescript/66961/8 "2019-10-12T03:52:56Z")

</div>

Closed on October 12, 2019, 3:52am UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
