A character selection screen tutorial anyone?

Hello everyone, I’ve been looking for a tutorial about to how to create a simple character selection screen tutorial, for a 2D game, so if there’s any that I missed while looking please let me know…

Thanks in advance.

Can you be a little more specific about what you are looking for from a tutorial like this?

I have 3 characters and I wanna pick up or lets say select one of them and then instantiate or start the level.

regards.

I don’t know of any tutorials, but I can give you the basic process I would follow:

  1. Create a characterSelection game object.
  2. Inside of that add a characters object.
  3. Inside the character object, add the three character prefabs or models.
  4. Space the characters out evenly (one at 0,2,0, next 0,4,0, next, 0,6,0, or whatever spacing is needed.)
  5. Add some UI buttons for previous and next inside the characterSelection game object.
  6. Whenever the next or previous buttons are pressed, move the “characters” object forward or backward by 2 units (this will move all three characters because they are inside the “characters” object, but the UI buttons won’t move.).
  7. In your script keep track of the index of the selected character and then create that specific character in your game.
  • playerIndex starts at 0

  • When next is hit, it increases

  • When previous is hit, it decreases

  • if playerIndex == 0, hide the previous button with setActive(false)

  • if playerIndex == playerCount-1, hide next button with setActive(false)

I hope this helps you think through the problem.

You can check the learn site for the live training archives. I did a session on scroll lists at runtime, and you could,use something like that to creat a character selection list.

Thanks a lot both of you I’ll definitely check it out.

Here’s an example of what you could do with a scroll list:

Scroll list on the left, normal window in the right.

1 Like

Hello.

Would this idea work with a character select screen like Street Fighter? I am trying to make a Street Fighter style select screen that would work with the keyboard. So it would start out high lighting the top left character and then I can press up, down, left or right and select others.

I am sorry if this is asked in the wrong area.

thank you in advance.

This should work, as the ui has built in keyboard navigation.

For more detailed information please post in the UI section.

1 Like

Thank you.

I’ll look into that.

Adam, would you be able to add a link in for that tute? been going through them and couldn’t figure out which one it is.