[Solved] Protagonist choice via button click?
Posted: 05 Dec 2021 16:25
by justloveme94
Back again and still having issues with buttons!
I'm struggling what is the best way for the Player to choose their choice of protagonist spirte and furthermore, how to set and call the variable later so the dialogue displays the right character and pose? I cannot figure out how it would look syntax wise. I already have the button prefab set up with the one male and female choice.
Re: Protagonist choice via button click?
Posted: 06 Dec 2021 01:13
by justloveme94
Back again, a few hours later with a solution. Here it is for anyone else who is trying to set up a similar system.
I created a button prefab with separate buttons for my male and female protagonist options.
In the PlayScript attached to the button:
@set ProtagChoice="Vera" This will be whatever what your character is called under the Character Configuration.
In the script:
@char {ProtagChoice}.Neutral
This will display the appropriate character and expression.