• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Floating Texts

Status
Not open for further replies.
Level 5
Joined
Apr 13, 2008
Messages
184
I am making a single lane AoS map and there's damage tags for heroes however i do not want the damage tags to be seen when there is no visibility for the other team. It affects the gameplay as the enemy team knows where the opponents are if they are in combat. Is there a way out of this?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
I am making a single lane AoS map and there's damage tags for heroes however i do not want the damage tags to be seen when there is no visibility for the other team. It affects the gameplay as the enemy team knows where the opponents are if they are in combat. Is there a way out of this?

  • Floating Text - Show (Last created floating text) for (All players)
  • Floating Text - Hide (Last created floating text) for (All players)
when you create a floating text, show it only to owner of the attacking unit. or maybe you need to show opponent's damage, then this won't work.
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
There is the condition ((LOCATION) is visible to PLAYER) Equal to True which you can check to see if a player on Team A has vision of the point (because they have shared vision, right?) and the same for a player on Team B. If they do then show the floating text (like above) to a force for that team. Use a force (player group) variable that you set at the start of the game; you want to do this to avoid force leaks, and if you make lots of texttags those leaks will compound.
  • If (All conditions are true) then do (then actions) else do (else actions)
    • If - Conditions
      • (TempPoint is visible to Player 1 (Red)) Equal to True
    • Then - Actions
      • Floating Text - Show (last created floating text) for Team_A
    • Else - Actions
  • -------- At map initialization: --------
  • Player Group - Add Player 1 (Red) to Team_A
  • Player Group - Add Player 2 (Blue) to Team_A
  • -------- etc... --------
 
Level 5
Joined
Apr 13, 2008
Messages
184
There is the condition ((LOCATION) is visible to PLAYER) Equal to True which you can check to see if a player on Team A has vision of the point (because they have shared vision, right?) and the same for a player on Team B. If they do then show the floating text (like above) to a force for that team. Use a force (player group) variable that you set at the start of the game; you want to do this to avoid force leaks, and if you make lots of texttags those leaks will compound.
  • If (All conditions are true) then do (then actions) else do (else actions)
    • If - Conditions
      • (TempPoint is visible to Player 1 (Red)) Equal to True
    • Then - Actions
      • Floating Text - Show (last created floating text) for Team_A
    • Else - Actions
  • -------- At map initialization: --------
  • Player Group - Add Player 1 (Red) to Team_A
  • Player Group - Add Player 2 (Blue) to Team_A
  • -------- etc... --------


Hi thanks for the reply! It works like a charm didnt know about this! At first it didnt work but i realised you have to hide it from the other team as well. So under the then actions there must be Floating Text - Hide (last created floating text) for Team_A
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Test if the point or unit is visible to GetLocalPlayer when choosing to create/show floating text. Does everything you need with a fraction of the complexity.

Floating text is one of the few types that can be fully created and manipulated locally without causing a desync. Although one can create floating text anywhere on the map locally, any location object used to create it must not be locally created or it will cause a desync.

GetLocalPlayer returns the player assigned to the client. Hence for each player in game it will return their client at that point of the script. The value is not in sync between the clients hence allowing script to run "locally" for only 1 client. Only humans see floating text hence why it is so effective.
 
Status
Not open for further replies.
Top