• 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.

[Solved] TextTags

Status
Not open for further replies.
Level 4
Joined
May 23, 2010
Messages
83
Is there any way to show a text tag to a specific player? I need to do a damage system that shows a text tag just to the player who did the damage.

Any suggestions? I've searched but didn't find anything yet.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Just use GetLocalPlayer.
Usually you can't create an handle locally, since it will desycn, but texttags are pseudo handles, you can create them locally safely, it even helps to not reach the hardcoded limit of 100 simultaneous texttags.

JASS:
local string s = "texttag message"
// it's better to use the string outside the local block, just to avoid
// a possible string table desync (but personnaly i've never experienced it,
// anyway moar safety can't be bad)

if GetLocalPlayer() == yourSpecificPlayer then
 // do your stuff with texttag
endif
 
Level 4
Joined
May 23, 2010
Messages
83
Thank you, I'll try that. But I use a 'text tag system' which is a function where i create, set and destroy them. How does
JASS:
 GetLocalPlayer()
work?

edit: nvm, problem solved.
 
Last edited:
Status
Not open for further replies.
Top