• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Show text for one player

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
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
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
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.
Top