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

Status
Not open for further replies.
Level 13
Joined
Mar 29, 2012
Messages
542
You can do like this :
  • Example
    • Events
    • Conditions
    • Actions
      • -------- -------------------------------------------------------- --------
      • -------- Create your floating text here --------
      • -------- -------------------------------------------------------- --------
      • -------- Hide it for all players --------
      • Floating Text - Hide (Last created floating text) for (All Players)
      • -------- Show it to a player --------
      • Set TempForce = (Player group(Player 1 (Red)))
      • Floating Text - Show (Last created floating text) for TempForce
      • Custom script: call DestroyForce(udg_TempForce)
Or like this :
  • Example
    • Events
    • Conditions
    • Actions
      • -------- -------------------------------------------------------- --------
      • -------- Create your floating text here --------
      • -------- -------------------------------------------------------- --------
      • -------- Hide it for all players --------
      • Floating Text - Hide (Last created floating text) for (All Players)
      • -------- Show it to a player --------
      • Set TempForce = (Player group(Player 1 (Red)))
      • Floating Text - Show (Last created floating text) for TempForce
      • Custom script: call DestroyForce(udg_TempForce)
In trigger there is leaks that cause lags, and of course there's a way to remove it. Here is some leaks that many times not removed and the way to fix it :

Point leaks :
  • Example
    • Events
    • Conditions
    • Actions
      • -------- Leaks --------
      • Unit - Move SomeUnit instantly to (Center of (Playable map area))
      • -------- Fix the leaks --------
      • Set SomePoint = (Center of (Playable map area))
      • Unit - Move SomeUnit instantly to SomePoint
      • Custom script: call RemoveLocation(udg_SomeUnit)
Unit Group leaks :
  • Example
    • Events
    • Conditions
    • Actions
      • -------- Leaks --------
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
      • -------- Fix the leaks --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
There is more...but i forgot:grin:
 
Last edited:
Level 18
Joined
May 11, 2012
Messages
2,108
Here, that should do the trick ;)

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads Blah at (Center of (Playable map area)) with Z offset 4.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.75 seconds
      • 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 - Hide (Last created floating text) for (All players)
      • Floating Text - Show (Last created floating text) for Player Group - Player 1 (Red)
 
Level 18
Joined
May 11, 2012
Messages
2,108
You can do like this :
  • Example
    • Events
    • Conditions
    • Actions
      • -------- -------------------------------------------------------- --------
      • -------- Create your floating text here --------
      • -------- -------------------------------------------------------- --------
      • -------- Hide it for all players --------
      • Set TempForce = (All players)
      • Floating Text - Hide (Last created floating text) for TempForce
      • -------- Show it to a player --------
      • Set TempForce2 = (Player group(Player 1 (Red)))
      • Floating Text - Show (Last created floating text) for TempForce2
      • Custom script: call DestroyForce(udg_TempForce)
      • Custom script: call DestroyForce(udg_TempForce2)
Or like this :
  • Example
    • Events
    • Conditions
    • Actions
      • -------- -------------------------------------------------------- --------
      • -------- Create your floating text here --------
      • -------- -------------------------------------------------------- --------
      • -------- Hide it for all players --------
      • Set TempForce = (All players)
      • Floating Text - Hide (Last created floating text) for TempForce
      • Custom script: call DestroyForce(udg_TempForce)
      • -------- Show it to a player --------
      • Set TempForce = (Player group(Player 1 (Red)))
      • Floating Text - Show (Last created floating text) for TempForce
      • Custom script: call DestroyForce(udg_TempForce)

''All Players'' does not leaks AFAIK, so it's not nessesary to destroy it
 
Status
Not open for further replies.
Top