• 🏆 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!

Floating text and fog

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
How to make to players do not see floating text in the fog of war ? Current when a floating text is created it is visible to everyone even if they can't see the unit in the fog.
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
And what's the event/cond/actions for check if the unit is visible for each player ? Should I use "Or any conditions" and make "VIsible to player 1/player 2/player 3,etc" ? In my case, the event is "A unit start the effect of an ability" and then the floating text is the ability name, but it goes throught Fog :/
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Boolean Comparison > Visibility - Point Visible To Player. In GUI, you do not have proper means to create texttags for single players. However, you can limit the visibility via Floating Text - Show/Hide.

Iterate over your players, check their visibility of the unit, add them to a player group as appropriate, use the player group in the Show/Hide-action.
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
But do I have to make it 1 by 1 ? Like "Visibilty - Unit Visible to Player 1" and then "to Player 2" and there goes... If possible give me the triggers. Currently mine is:
  • Floating Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Ability being cast) Not equal to Doppel Walk (This wont display text)
      • (Ability being cast) Not equal to Grenade Original (Nor this)
    • Actions
      • Floating Text - Create floating text that reads (Name of (Ability being cast)) above (Triggering unit) with Z offset 0.00, using font size 10, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
but from here I don't know where or how to move.

bump
 
Last edited by a moderator:
Level 26
Joined
Aug 18, 2009
Messages
4,097
No, you can use loops.

  • Player Group - Remove all players from visGroup
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • ((Triggering unit) is visible to (Picked player)) Equal To True
        • 'THEN'-Actions
          • Player Group - Add (Picked player) to visGroup
        • 'ELSE'-Actions
  • Floating Text - Create floating text that reads <text> above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Floating Text - Hide <texttag> for (All players)
  • Floating Text - Show <texttag> for visGroup
The Unit Is Visible To Player function also considers invisibility by ability.
 
Status
Not open for further replies.
Top