Announcement

Collapse
No announcement yet.

How change the player Name and the Player Index?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How change the player Name and the Player Index?

    Hi.
    I would like the player of my game can to set up your Player Name and Player Index before begins play. Can you help?

    Thank you.

    #2
    Yeah,

    First, set up a widget with a text box. In the image below I put a Text and a text box in a Vertical box. And a play button to open the next level. When you press enter after typing in the text box you can call an event which in the image below this one.

    Click image for larger version

Name:	SavePlayerName2.PNG
Views:	1
Size:	200.3 KB
ID:	1075936

    To set a var somewhere else in your game you need to be able to reference it. Mine is located in my game state once the game starts, but everything gets saved out to my game mode. Yours could be anywhere, just make sure you know how to reference it. When you press "enter" when typing in the string box, the "OnTextCommitted" event is called, send the text to whatever text or string var you want to set. it is that easy.

    Click image for larger version

Name:	savePlayerName.PNG
Views:	1
Size:	372.2 KB
ID:	1075937

    Comment

    Working...
    X