Topic: Character Selection

How do i make user select a character only when a select button is pressed instead of default automatic selection when character is clicked?

Share

Thumbs up Thumbs down

Re: Character Selection

Open UFE\Engine\Scripts\UI_Templates\DefaultCharacterSelectionScreen.cs and look for this code segment (should be on line 433):

button.onClick.AddListener(() => {this.TrySelectCharacter(index);});

Just comment that line (add // before it) and it should work.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.

Re: Character Selection

after commenting the code, i cannot select between any player. i.e. the p1 hover always stays at top right character and p2 always at bottom left and i cannot click other characters

Share

Thumbs up Thumbs down

Re: Character Selection

I'm not sure I understood the question. Commenting that line will make it so you can't "mouse click" to select a character. Selection will only happen when you use the confirm button (http://www.ufe3d.com/doku.php/global:input)

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.

Re: Character Selection

if I add // before button.onClick.AddListener(() => {this.TrySelectCharacter(index);}); also I can not update sethoverindex. But I need to preview the character game object after I would like to confirm maybe with another button.
I'm trying to implement a two-step character selection on mobile: first, players preview a character by tapping on it, then they confirm their selection with another button. I'm stuck on two points:
How can I show a character is being previewed (something like setHoverIndex) before the player confirms their selection?
How can I determine if the current user is Player 1 or Player 2 during this selection process?
Any advice or code examples would be greatly appreciated!

Share

Thumbs up Thumbs down