Branching scene help

So im trying to do this one scene that varries depending on the ro and im having issues making it work this is what

it looks like

what am i doing wrong

Try like this.

*if (romance = Nero)
  *goto green
*if (romance = Zarola)
  *goto orange
*if .....
  *goto .....
*if....
  *goto....
*label green
asd.....
*label orange
asd2....

all the “*if” go together and then the “*label”.
otherwise the program would read the first *if and then a label, and it will see it as if there were no more *if. I think that could be the problem. I might be wrong though. let me know if that works.
*edit also you need to add tab or spaces below the *if, and remove the ones from the labels.

*if
(space / tab)text
*label
(no space)text

You have no indentation.

so i did that and this is what it looks like

and then this is what happens

Alright, now you’ll have to use *if as your first and *elseif for the rest.

*if ....
  *goto ....
*elseif .....
  *goto ....

if you use *if it will check every one of them and if the condition is true it will show the text.
if you use *if on your first and *elseif on the rest it will check in order and show only the first condition that is true.
I recommend you to read the tutorials for the choicescript, it is well explained there, probably better than me. Sorry for the messy response, I’m working.

1 Like

its fine i understand but it still didnt work

You should put the value of your variable in quotes " " when it is not a number. So e.g.

*if (romance = "Zarola")

Next, right now the game will jump from label grey to wolf to blue etc because there is not *goto at the end of the labels to direct them to another place. If there’s not *goto, the *labels will go with the flow and display the next label. If you don’t want *label grey to lead to *label wolf etc, you should enter a *goto xxx to redirect it to another place.

*label grey
You stare on in shock as the figure....
*goto xxx

*label wolf
You stare on in shock...
*goto xxx

*label xxx
Here's where the branches meet again.

This way, you make sure that *label grey jumps to *label xxx once it comes to an end and not go to *label wolf directly following it. Right now both *goto lead to the same *label, but you can of course make them lead to different *labels for further branching.

Also, I would recommend using Notepad++ to write the game in. It’s nicer to look at, has overall more functions, you can install a “language” pack for ChoiceScript that’ll mark different code commands with different colours, and it’ll also display markings to help you check on which indent level a command/text is. And if your testing ever results in a bug “error in line XXX”, you’ll have an easier time finding that line in Notepad++ as it displays line numbers.

4 Likes

ohhhh so i was just stupid alright thanks that helped alot

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