• 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

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
Hello. just a quick question.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Triggering unit)) Equal to Peasant
    • Then - Actions
      • Floating Text - Create floating text that reads PeasantSays[(Random integer number between 1 and 4)] at (Position of (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 - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Sound - Play PeasantWhat2 <gen>
    • Else - Actions
the text doesn't get removed, it's still permanent. Why?

edit: it seems to work after adding a fading age, is that really needed?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Ah.. I didn't know that. So you can't change how slowly it will fade then?

This is what fade time is?If you change fade time to 5, floating text will be %0 transparent at 0 second and %100 at 5.
 
Ah.. I didn't know that. So you can't change how slowly it will fade then?

Yes, depending on the fading age duration. Think about it, from 0% it will go to 100% transparency within <duration> seconds. In that case, however, life time should be >= fading time.

Edit: About floating texts that already have transparency upon creation or through Change Color action, the transparency is unfortunately reset before the fading begins. In that case, you need to trigger it.
 
Status
Not open for further replies.
Top