Hey there.Im not sure if I summarized it well but basically i’m looking for the answer to the question I put in the title.
Im coding a scene where you have the option to pick your location in the first chapter (frozen lake,woods or a cave) and in Chapter 2 based on the choice you made before there is a different text and sequence of events.
I exhaustively searched the ChoiceScript wiki, google and this very forum but no matter how much i try I end up getting more and more confused…Im sure I have found the answer somewhere in those resources but I’m so puzzled at this point that I can’t seem to understand which exactly is the solution…
If I understood correctly it has something to do with *else,*elseif,*if or something along those lines but everytime I go back to reading about those subjects my mind gets fried…Maybe it’s just me who knows…but for the sake of my life & sanity I can’t seem to get how it works inside my head.
I quickly learned pretty much all the other basic stuff in ChoiceScript but this one is giving me such a hard time.Any help would be much appreciated.
Again I apologize if this is something stupidly easy, already answered or obvious but I really tried to the best of my ability.
1 Like
Put a *create location
in your startup file. In your Chapter 1, *set location
to either lake, woods, or cave under the choice. The game will remember this.
And then in your Chapter 2, use something like this:
*if (location = "lake")
Lake text
*goto next
*elseif (location = "woods")
Woods text
*goto next
*elseif (location = "cave")
Cave text
*goto next
*else
bug
*label next
More text
*finish
Go ahead and copy this code, trial and error is a good way to learn.
9 Likes
Thanks a bunch!This did the trick! …And yes indeed, i must agree that trial and error is a good way of learning things.
Have a nice day/night!
1 Like
This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.