[Trigger] Show text for one player

Status
Not open for further replies.
If he's already using Custom scripts for GetLocalPlayer() better of using
  • Custom script: call DisplayTimedTextToplayer(Player(GetPlayerId(GetTriggerPlayer())), 0, 0, 10, "Your MessageHere")
 
If he's already using Custom scripts for GetLocalPlayer() better of using
  • Custom script: call DisplayTimedTextToplayer(Player(GetPlayerId(GetTriggerPlayer())), 0, 0, 10, "Your MessageHere")

"p" has to be capitalized and you can simplify the code to:
  • Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 10, "Your Message Here")
But in general, I think you can also just change "All Players" in the code to Player 1 red or something, I don't remember if it creates a new force though. It might just return bj_FORCE_PLAYER
 
Just create a Player Group variable and change the (All players) with the variable, after that you will have to
call DestroyForce(udg_YourPlayerGroupVariable) to clean the Player Group leaks.

  • Actions
    • Set pg = (Player group((Triggering player)))
    • Game - Display to pg the text: Hey bitchas
    • Custom script: call DestroyForce(udg_pg)
Convert Player To Player Group

This is the GUI way, if you want the JASS way, just follow what Purge stated.
 
Status
Not open for further replies.
Back
Top