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

Floating Text above an unit

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
how can I make a floating text above an unit but following this unit forever? When I try to make it doesn't work cuz when the unit walks the floating text stays on its last position. How to make it walk along with the unit above it?
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Store the floating text and the unit into a variable. And refresh the position of the floating text each 0.04 seconds. (or something like that)

Can u give trigger [tiger] example ? plz :*
 
Create a unit and a floating text variable in variable editor.

Trigger 1:

Event:
Player 1 types "test" // or what ever

Actions:
Set unitVariable = YourUnit
FloatingText - Create A Floating Text Above unitVariable
Set floatingVariable = LastCreatedFloatingText
___________________________

Trigger 2

Event:
Every 0.03 seconds of the game

Actions:
FloatingText - Change Position of floatingVariable to Position of unitVariable
___________________________

Read this tutorial if you don't know about memory leaks yet: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

(periodic triggers that fire so often always have to be leakless)
 
  • Like
Reactions: hdm
Status
Not open for further replies.
Top