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

Fading Floating Text

Status
Not open for further replies.
Level 8
Joined
Jan 18, 2007
Messages
331
hmm... cant you just make a variable (FLOATING TEXT) and then set it to last created ~. then you can use jass to delete it (if i werent so bad at jass id write a jass 4 u now) or mabey select delete last created ~.
 
  • Events
  • A unit begins to cast a spell
  • Conditions
  • (Ability Being Cast) equal to Explosion
  • Actions
  • Floating Text - Create floating text that reads Life now at 20% above Casting Unit blah blah blah..
  • Floating Text - Change Fading Age of (Last created floating text) to 2.00 seconds
  • Unit - Set life of (Triggering Unit) to 20.00%
thats how i did it.
 
Level 7
Joined
Jul 14, 2006
Messages
292
Ok so you did:

  • Events
  • A unit begins to cast a spell
  • Conditions
  • (Ability Being Cast) equal to Explosion
  • Actions
  • Floating Text - Create floating text that reads Life now at 20% above Casting Unit blah blah blah..
  • Floating Text - Change Fading Age of (Last created floating text) to 2.00 seconds
  • Unit - Set life of (Triggering Unit) to 20.00%
I said to change the text to disable permanence. But you didn't.

Here I made a trigger that makes appear the name of the each ability casted over their casting unit. The text slowly goes up and then, it fade away.

  • Ability names
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (Name of (Ability being cast)) above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set AbilityNameFloatingText = (Last created floating text)
      • Floating Text - Change AbilityNameFloatingText: Disable permanence
      • Floating Text - Change the lifespan of AbilityNameFloatingText to 5.00 seconds
      • Floating Text - Change the fading age of AbilityNameFloatingText to 4.00 seconds
      • Floating Text - Set the velocity of AbilityNameFloatingText to 64.00 towards 90.00 degrees
See the:

  • Floating Text - Change AbilityNameFloatingText: Disable permanence
If you don't disable the permanence, your text won't fade cause it is supposed to last forever. You need to disable permanence. It also needs to be placed before the fading age action.

  • Floating Text - Change the lifespan of AbilityNameFloatingText to 5.00 seconds
You also need a lifespan which will also be before the fading age action. The lifespan is the total ammount of time your text will last. The fading age is when your text will start fading. Your text will entirely be faded out when it will reach its lifespan limit.

So if I set an exemple:

  • Events
  • A unit begins to cast a spell
  • Conditions
  • (Ability Being Cast) equal to Explosion
  • Actions
  • Floating Text - Create floating text that reads Life now at 20% above Casting Unit blah blah blah..
  • Floating Text - Change (Last Created Floating Text): Disable permanence
  • Floating Text - Change the lifespan of (Last Created Floating Text) to 4.00 seconds
  • Floating Text - Change Fading Age of (Last created floating text) to 2.00 seconds
  • Unit - Set life of (Triggering Unit) to 20.00%
A unit will cast Explosion and BAM! A "Life now at 20%" will appear over the casting unit's head. After 2 second the text will be fading, and 2 second after the text started fading, it will be completely disapeared.

Do you understand now?

And by the way... You should set a variable for that, but it's your choice...
 
Level 7
Joined
Jun 4, 2006
Messages
127
Sorry that I may have posted late, but I think the Fading Age should be 0.
Just do it like this..

  • Floating Text - Create Floating Text that reads: (String) Above (Unit)/On (Region/Point) with Z offset 0 using Font Size (8-10 or somethin'), color (100% 100% 100%) and 0% transparency.
  • Floating Text - Change (Last Created Floating Text): Disable Permanence
  • Floating Text - Change the Life Span of (Last Created Floating Text) to 3.5 seconds
  • Floating Text - Change the Fading Age of (Last Created Floating Text) to 0.00 seconds
  • Floating Text - Set the Velocity of (Last Created Floating Text) to 18.00 towards 90.00 degrees
This kind of actions will be shown like how Bounty, Wood, Critical Strike, etc. would fade.
 
Status
Not open for further replies.
Top