Hi. Im looking for a way to get a player's name and then place it into a piece of text within the "text message" trigger. For example, in what im making, whenever the player's hero unit dies; a trigger will fire and create a text message that says "(Player name) has been destroyed". It would be a massive help if someone would show me how to accomplish this. Thankyou for your time...
UI - Display (Combine ((Name of player (Triggering player)), " has been destroyed")) for (All players) to Subtitle area
Text Message
Message: Combine Text Multiple
Text <Text+>
Text: Name Of Player
Player: Triggering Player
Text: " has been destroyed"
Players: All Players
Message Area: Subtitle
One has to get the player's name as text. One can then combine it with any other text as normal.
Thasks, but what exactly triggers do I use? All I got from that is to use the "UI Display" trigger.... I am still learning and experimenting with triggers, so I don't know all the kinks of the editor.
When you make an ability, you can set the button hotkey to be whatever you want, including multiple keys separated by a +. If you want a notification message everytime they use that ability, you can use that method.
Then in triggers:
You can make an event for ability is used. This will give you all the info you need, as you can reference owner of triggering unit to get the player name. You should be able to create the message with what you have here.
Hi. Im looking for a way to get a player's name and then place it into a piece of text within the "text message" trigger. For example, in what im making, whenever the player's hero unit dies; a trigger will fire and create a text message that says "(Player name) has been destroyed". It would be a massive help if someone would show me how to accomplish this. Thankyou for your time...
An action like...
One has to get the player's name as text. One can then combine it with any other text as normal.
Thasks, but what exactly triggers do I use? All I got from that is to use the "UI Display" trigger.... I am still learning and experimenting with triggers, so I don't know all the kinks of the editor.
How do you know what is a player hero unit? Are all appropriate units in a unit group or in a per player array?
simple - in my game the player has only 1 unit: a hero unit. Its basically a hero arena arcade game...
screenshots
Got a question aswell.
How you can get for example with a key: Crtl+Abelity Icon, saying as text message ''Name need 30 seconds' or ''Name its ready''.
In reply to Forge_User_11421188:
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here