• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Floating Text

Status
Not open for further replies.
Level 9
Joined
Sep 15, 2012
Messages
311
I've noticed that if I put a floating text on a place, it is visible even if the region is not explored yet (covered in black mask) and during cinematics, if the camera view is facing the direction of the floating text (even if it's 1 kilometer away!)

Is there a way to avoid this?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Test this:
  • Untitled Trigger 108
    • Events
    • Conditions
    • Actions
      • Set point = (Center of (Playable map area))
      • Set string = <Empty String>
      • Custom script: if IsVisibleToPlayer(GetLocationX(udg_point), GetLocationY(udg_point), GetLocalPlayer()), then
      • Set string = Floating text text
      • Custom script: endif
      • Floating Text - Create floating text that reads string at point with Z offset 0.00, using font size 10.00, color ...
      • Custom script: call RemoveLocation(udg_point)
 
Level 9
Joined
Sep 15, 2012
Messages
311
Sorry. I am too noob and get confused.

I want to create Floating Texts with the name of each city, in front of the city's entrance.
I want this Floating Text to be visible when its location is visible and in Fog of War.
I don't want it to be visible if its location is in Black Mask (not yet explored) and of course not during cinematics.

My idea so far is:

  • Untitled Trigger 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
      • ((Location1) is masked for Player 1 (Red)) Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • Floating Text - Create floating text that reads CITY NAME at (Location1) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set Text1 = (Last created floating text)
then hide it for cinematic:

  • Untitled Trigger 002
    • Events
      • Game - CinematicOn becomes Equal to 1.00
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Floating Text - Hide (Text1) for Player Group - Player 1 (Red)
and Show when cinematic is over:

  • Untitled Trigger 003
    • Events
      • Game - CinematicOn becomes Equal to 0.00
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Floating Text - Show (Text1) for Player Group - Player 1 (Red)
Will this work or am I just thinking nonsense?
 
Last edited:
Status
Not open for further replies.
Top