I'm looking to create a trigger that sets a bounty onto a random player's hero. Furthermore, I would like a text message to be displayed with the player's name in a sentence, (i.e, "PlayerX now has a bounty!"). How should I go about doing this? Would be grateful for any help/ideas.
I just grab the player's name at map startup and assign it to an array of text values, if you have 5 players, make it an array of 5, then just use the player number to call it. Here is me assigning an array value a name, with color.
Then whenever you want to use that name anywhere, just use gv_playerName[PlayerNumber] inside the text. Probably something like:
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, (gv_playerName[PlayerNumber] + StringToText(" now has a bounty! Had sex with the mayor's daughter!")));
Create a "Text Message" action. Click on "Message" and go to the function "Combine Text". Click on "Text 1" and set the function to "Name of Player" and choose what player you want. Then, set "Text 2" to "has a bounty".
I'm looking to create a trigger that sets a bounty onto a random player's hero. Furthermore, I would like a text message to be displayed with the player's name in a sentence, (i.e, "PlayerX now has a bounty!"). How should I go about doing this? Would be grateful for any help/ideas.
@Trapscape01: Go
I just grab the player's name at map startup and assign it to an array of text values, if you have 5 players, make it an array of 5, then just use the player number to call it. Here is me assigning an array value a name, with color.
gv_playerName[lp_playerNum] = StringToText("<c val=\"") +
StringToText(libNtve_gf_ConvertColorToString(libNtve_gf_ConvertPlayerColorToColor(PlayerGetColorIndex(lp_playerNum, false))))
+ StringToText("\">") + PlayerName(lp_playerNum) + StringToText("</c>");
Then whenever you want to use that name anywhere, just use gv_playerName[PlayerNumber] inside the text. Probably something like:
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, (gv_playerName[PlayerNumber] + StringToText(" now has a bounty! Had sex with the mayor's daughter!")));
Here's a more simple solution:
Create a "Text Message" action. Click on "Message" and go to the function "Combine Text". Click on "Text 1" and set the function to "Name of Player" and choose what player you want. Then, set "Text 2" to "has a bounty".
Thanks for your help guys!