[Solved] Protagonist choice via button click?

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
justloveme94
Posts: 25
Joined: 18 Feb 2021 14:26

[Solved] Protagonist choice via button click?

Post 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.

Last edited by justloveme94 on 06 Dec 2021 01:14, edited 1 time in total.
justloveme94
Posts: 25
Joined: 18 Feb 2021 14:26

Re: Protagonist choice via button click?

Post 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.

Post Reply