Setting actors display name to a variable.
Posted: Wed Jul 15, 2020 8:36 pm
I want to change an actors display name after he writes it in a text field.
I know how to set a variable with a text field by entering in the dialogue text:
And I saw on an old post that you can change the display name in the Script with:
However, I ran into two problems. First being that Actor["Player"].Display_Name = "Alex" doesn't seem to work. And the second being, if it did work, how do I make it take in the variable playerName instead.
I tried:
But, that didn't work.
To put it into a simpler perspective, I simply want the dialogue to ask, "what is your name" and then have the player type a response. Then for the player to have that response set to his display name.
What I have now is one node having in the dialogue text:
Then another node with this written in the Script section:
I know how to set a variable with a text field by entering in the dialogue text:
Code: Select all
[var=?playerName]
Code: Select all
Actor["Player"].Display_Name = "Alex"
I tried:
Code: Select all
Actor["Player"].Display_Name = Variable["playerName"]
To put it into a simpler perspective, I simply want the dialogue to ask, "what is your name" and then have the player type a response. Then for the player to have that response set to his display name.
What I have now is one node having in the dialogue text:
Code: Select all
What is your name?[var=?playerName]
Code: Select all
Actor["Player"].Display_Name = Variable["playerName"]