• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Floating texts

Status
Not open for further replies.
Level 2
Joined
Jul 16, 2007
Messages
19
I got a floating text that's come over dying unit.. But if multiple units die only last texts is removed. Tried with variables but still didn't work.
can anyone help me? This is what i tried:
  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Hunter
    • Actions
      • Hero - Set (Killing unit) Hero-level to ((Hero level of (Killing unit)) + 1), Hide level-up graphics
      • Player - Add 1 to (Owner of (Killing unit)) Current lumber
      • Player - Add 100 to (Owner of (Killing unit)) Current gold
      • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + ('s hunter was owned by + (Name of (Owner of (Killing unit)))))
      • Floating Text - Create floating text that reads Ahh! above (Dying unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set die = (Last created floating text)
      • Wait 2.00 seconds
      • Floating Text - Destroy die
 
You must set for each text one Arry

  • Events:
  • Unit - A Unit die
  • Actions:
  • Flooding Text - Create Floding Text about <dieing Unit> <TEXT here> <OFFSET here>
  • Set F_Text[1] = last create flooding text
  • Wait 10 sec
  • Remove F_Text[1]
U must create a variable:

F-Text
Flooding Text
Array YES

Hope u understand^^
 
Hmm.. Didn't understand that CrazyBloodyVamp :P Can u make a trigger i could use if 3 units die?(dont think that would happen but xD)
And btw... Dunno how to use jass... Never tried it.. Maybe i should give it a try ^^
 
Ok its my first time with trigger so i need a mom plz^^

First u create a Varible like:
F_Text
Floodin Text
Array YES [3]

  • Unit die
  • Events:
    • Unit - A Unit die
  • Actions: If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Unit Type of Dieing Unit = Hunter
    • Then - Actions
      • Create Floading Text above Dieing Unit <Text>
      • Set F_Text[1] to last created Floading Text
      • Wait 10 sec
      • Remove F_Text[1]
    • Else - Actions
      • If (All Conditions are true) then do (The Actions) else do (Else Actions)
      • If - Conditions
        • Unittype of dieing unit = Necromancer
      • Then - Actions
        • Create Floading Text above dieing Unit <Text>
        • Set F_Text[2] to last created Floading Text
        • Wait 10 sec
        • Remove F_Text[2]
 
Last edited:
no need for locals. no need for arrays. no need for jass.

just set its "permanent" property to false and it will be automatically destroyed. (also set lifespan to 3 sec, direction to 90 deg and speed to 100 or whatever)
 
WoW i try to explain it dont work all say something but i try it and it work...

and sorry i cant do triggers here... first time that i try it -.-;;

WOW i fexed hope u understand know^^
 
Nice, that worked fine ^^ :thumbs_up: for you ;)
  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Hunter
    • Actions
      • Hero - Set (Killing unit) Hero-level to ((Hero level of (Killing unit)) + 1), Hide level-up graphics
      • Player - Add 1 to (Owner of (Killing unit)) Current lumber
      • Player - Add 100 to (Owner of (Killing unit)) Current gold
      • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + ('s hunter was owned by + (Name of (Owner of (Killing unit)))))
      • Floating Text - Create floating text that reads Ahh! above (Dying unit) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.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 5.00 seconds
 
Status
Not open for further replies.
Back
Top