• 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] Floating text only visible for 1 player!

Status
Not open for further replies.

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
Hi there! I need help with making the floating text only visible for 1 player. I searched through the forum, but couldn't find any answers. :con:

And the text must be visible only to owner of killing units custom unit value (player number)

  • Set TempPoint1 = (Position of (Triggering unit))
  • Player - Add ((Point-value of (Triggering unit)) / 2) to (Player((Custom value of (Killing unit)))) Current gold
  • Floating Text - Create floating text that reads (|cffFFFF00 + (String(((Point-value of (Triggering unit)) / 2)))) at TempPoint1 with Z offset 16.00, using font size 10.00, color (100.00%, 81.00%, 0.00%), and 0.00% transparency
  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
  • Custom script: call RemoveLocation (udg_TempPoint1)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
By default, all floating text is visable.
You simply have to compair players with GetLocalPlayer and if they you do not want that player to see the text hide it for them.
GetLocalPlayer basically returns the player of who ever computer is running that piece of the script at a time, thus the value for it is different on every computer that runs it when it runs it. This means it can be used to run script segments out of sync from other players. Thus it results in letting you show something to only 1 player well all others see it as hidden. However if you use any thing that causes net traffic or affects game play in a actual stat way with GetLocalPlayer, the game will desync and overall be ruined.
 
Level 3
Joined
Feb 24, 2008
Messages
67
  • Floating Text - Show (Last created floating text) for <your player referrer here>
Use the last function in the "show floating text" function (Convert Player Group to Player) Should be fine since you use custom values to refer to the triggering player.

Emperor_d3st, he doesn't know JASS ooo... it's better to just use GUI
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
But I'm just using

  • Custom script: if GetLocalPlayer() == Player(1) then
  • Floating Text - Create floating text that reads (|cffFFFF00 + (String(((Point-value of (Triggering unit)) / 2)))) at TempPoint1 with Z offset 16.00, using font size 10.00, color (100.00%, 81.00%, 0.00%), and 0.00% transparency
  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
  • Custom script: endif
?


But what value can I enter to get the custom unit value of killing unit instead og just 1 for player ID? (I know that 1 = player 2; 2 = player 3...). I tried to enter the getkilling...blabla instead of the number, and that didn't seem to work when I tried to save the map.

This is useful to know for using on the multiboard :)

________________


btw, I did overlook the
  • Floating Text - Show (Last created floating text) for <your player referrer here>
action
 
Status
Not open for further replies.
Top