Tara explains: How to make a dressing game optional for the reader (& sample coding for this)


#1

Author: Tara Star (TaraStar on the Forums, tarastarofficial on Instagram).

Okay, so today’s article is on something that can seem confusing at first (it was to me as well!) but can actually be done fairly easily: having an optional dressing game! So, how would you do that? Here’s how!

Let’s say you want to give the reader a choice to get changed in a story, and if they select yes, then they play a dressing game, but if they select no, then the story continues. Your initial idea might be that you could simply put the dressing game in the branching, right? Not exactly – you cannot have labels within branching! But, you can refer to labels in your branching…

So, how would you do it? To begin, create a simple choice, with a “yes” option and a “no” option. Then, here’s the special part: in the yes option, put “goto dressing_game_yes” and in the no option put “goto continue_story” exactly as I’ve just written (but without the quotation marks!). I’ll be using these labels in my example, but really, you can pick any labels you like once you understand what we’re doing. So, next, end your choice (it should only be a few lines long) then OUTSIDE of the choice, you now need to insert/create your dressing game. Now, if you use an ordinary script template from the Episode catalogue, there will already be a label there, and if so then don’t change it. Just leave it. Then, BEFORE the dressing game begins but AFTER the original yes/no choice, write “label dressing_game_yes” which you might notice is the same label that we referred to in the “yes” branch of the original choice.

Now, you can create your dressing game however you like, and just make it exactly the same way that you’d make a normal dressing game. Once you’re done, here’s the next special part: at the very end of the dressing game, once the character has chosen their outfit/got changed and is happy with their look, now you need to write “goto continue_story” directly underneath the dressing game. Finally, the last thing you need to do after writing that is leave a couple of lines, then type “label continue_story” and if you now double check by reading back through the code, no matter whether you selected yes or no at the beginning you should eventually end up at this label – so now you can continue writing your story as usual! Don’t forget to test everything thoroughly before publishing!

I hope this helped everyone, and to just make that all a bit clearer then please see below for my example code that you can copy/paste/adapt for your story. I’ve used the standard Episode dressing game script template as the base for the following coding (although I’ve edited it a bit). As always, DM me on Instagram (I’m tarastarofficial) or comment below if you have any questions, and check out my author profile on the Forums or follow the links on my IG page (I’m tarastarofficial) to see more articles and advice! Thanks for reading :blush:

LINK TO TARA’S TEMPLATE (as always, please give credit if you use/edit it):


How to make choices
#3

#4

#6

Thank you for these awesome tips :smile:


#7

No problem! I hope you find them useful and feel free to check out my other articles to find out more cool coding tricks and help!


#8