Flexible order of scenes?

I know how to write scenes and include them into mygame.js.
If you want to go to the next scene, you just write *finish into the last scene (at the end of a *choice for example).

I also have an idea how to skip a scene that should not be played if some choise was made.
(let that choice set a variable to true, then *finish, ask in the beginning of that scene *if it should be skipped…)

But is there any command that lets you move backwards in your list of scenes or choose one specific scene just by its name?

I would like to include some randomly chosen scenes into a game (so that the order of some scenes is random… or maybe depends on the choices) - how could I do that?

Isn’t that the *goto_scene command?

Oh… there is a “*goto_scene” command?

Thank you… all I wanted to know… X_X

Yep, *goto_scene will take you to a specific scene, *finish will just take you to the next scene, as defined in ‘mygame.js’

For the random scenes, I would suggest something like this:

*temp die_roll
*rand die_roll 1 3
*if die_roll >2
*comment This means if die roll is 1
*goto_scene random1
*elseif die_roll >3
*comment this means if die roll is 2, as 1 is already covered
*goto_scene random2
*else
*comment this means 3, as 2 and 1 are already covered
*goto_scene random3

Obviously, define all the scenes in ‘mygame.js’ but you don’t need to define die_roll as it’s created by a *temp

Hope this helped! :slight_smile:

and you also have to use the label commands so like


blablabla.
\*goto_scene blabla
\*label blabla

also the die_roll could be a stat fixed in your mygame.js file to use it all the game I already have it you only have
*rand die_roll 1 100

Aren’t label commands supposed to be inside scenes?

@akatsuki9344 I believe @Happy is correct- for going to a new scene, that doesn’t require a *label as it is loading a new .txt file, not going to a different place in one file. You would use a *label as such:


Do you want blue or black?
*choice
  #Blue
  *goto blue
  #Black
  *goto black

*label blue
You have blue.
*ending

*label black
You have black.
*ending

Using a *goto_scene you would simply do as such, having declared the scenes in ‘mygame.js’:


Do you want blue or black?
*choice
  #Blue
  *goto_scene blue
  #Black
  *goto_scene black

However, using too many *goto_scene commands will result in a lot of scenes, which can be very untidy.

And @MaraJade you are indeed correct. I use *temp for things I’m going to use *rand with as I like to keep my mygame.js file short, but everyone has their own way :slight_smile:

yes i got a kilometrical stat but is more confortable for me to track things

Wow, thank you all for the help…
My 2nd thread in this forum and twice I got great answers.