Brief description
Even if I'm not into tutorials about something an extension/studying documentation could do just fine, I've recieved an offer for doing this, so… here comes nothing. Check this tutorial if you'd like the player to choose an outift before their date or whatever (much like in various otome games).
Template used for this tutorial: Sample Scripted-based UI, 720 x 1280 (my patron wants to develop a mobile game)
Requirements
- Having read the Beginner's Guide. I can't help you either otherwise.
This tutorial lists all of the methods to achieve the above-mentioned goal without scripting and up to version 1.0.1077. Because of this, one might consider many of them just workarounds.
Tutorial body
- Method 1: repeated conditions (in new scene)
- First of all, we need to ask the player about their desired outfit. Here's a possible set up:
Spoiler
- Next is the player's choice. Since you may want to give them more than two options, a switch is not enough: we need a number variable. Also, since in our example the entire date takes place in the same scene of this choice, our number variable should be local. Let us assign a number to each option in order to memorize the right outfit (labels should do the trick). For example, 0 = date, 1 = yukata, 2 = uniform.
Spoiler
- Finally, every time you need yor main character to join the scene or change expression, use conditions to choose the right outfit. Don't forget to shorten your scene using common events!
Spoiler
- First of all, we need to ask the player about their desired outfit. Here's a possible set up:
- Method 2: overlapping stuff (in new scene)
- This one is basically the same as method 1 up to point 2 included, but after that some tricks are used to avoid calling the same common events over and over to change expressions or have your character join the scene
- As you'll probably realize anyway later, this method works only if the differents expressions of your MC do portrait them always in the same pose (their facial expressions can differ though)
- We need to separate our sprites's faces from the rest of the image, like this:
Spoiler
- Next is creating new expressions from the database for each of these faces.
Spoiler
- All you gotta do when eventing your scene is a single condition (see Method 1, point 3) to make the MC join the scene with one of their outfits.
- If you want to change their expression, instead, use a new character that uses one of the "Faces" expressions: just make sure to overlap the two characters (the original one and the face) perfectly. Also, the outfit's Z-index must be 1, while the face's one must be 2. This way, the face will be the one covering the outfit and not vice versa.