• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Critical question

Status
Not open for further replies.
Level 3
Joined
Jan 10, 2005
Messages
30
How can I make text appear (I know the tirgger for the text) when a Critical Strike hits? I need to know this for an important spell, the thing is I don't know how to make Text appear instead of Numbers when a critical strike hits... :( Help plz.
 
Level 3
Joined
Jan 10, 2005
Messages
30
Yeah but how do I make it appear instead of the Critical Number, and how do I let the trigger know when to do it, which is when the critical % is true...
 
Level 10
Joined
Apr 9, 2004
Messages
502
Like daelin said, this has to be triggered. All you do is make a trigger to detect when a unit is attacked, then (for most units this should work) wait 0.1 seconds adn deal the actual bonus damage you would deal and get it to create a floating text.........Perhaps i better just post how i did it (it's pretty much flawlwess my trigger)


My trigger

Inferno damage
Events
Unit - A unit Is attacked
Conditions
(Attacking unit) Equal to Earth Dragoon 0013 <gen>
Actions
Set InfernoDamageStore = 0.00
Set InfernoDamageStore = (InfernoBidedDamage x (Random real number between (0.01 + (0.01 x (Real((Level of Inferno (activatable) for Earth Dragoon 0013 <gen>))))) and (0.01 + (0.02 x (Real((Level of Inferno (activatable) for Earth Dragoon 0013 <gen>)))))))
Set InfernoBidedDamage = (InfernoBidedDamage - InfernoDamageStore)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
InfernoArrayIncreaser Equal to 100
Then - Actions
Set InfernoArrayIncreaser = 0
Else - Actions
Set InfernoArrayIncreaser = (InfernoArrayIncreaser + 1)
Wait 0.10 seconds
Unit - Order Earth Dragoon 0013 <gen> to damage (Attacked unit) for InfernoDamageStore using attack type Hero and damage type Fire.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
InfernoDamageStore Less than or equal to 0.00
Then - Actions
Do nothing
Else - Actions
Floating Text - Create floating text that reads (Inferno + !) at (Position of (Attacked unit)) with Z offset 100.00, using font size 9.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set InfernoDmgBonusFT[InfernoArrayIncreaser] = (Last created floating text)
Floating Text - Set the velocity of InfernoDmgBonusFT[InfernoArrayIncreaser] to 64.00 towards 90.00 degrees
Floating Text - Change permanent state of InfernoDmgBonusFT[InfernoArrayIncreaser] to Disable
Floating Text - Change the lifespan of InfernoDmgBonusFT[InfernoArrayIncreaser] to 2.00


Just pay attention to the wait, the damage dealt and the floating text triggers as well as the variables associated with them.

One more thing, i only got mine to show the words if he dealt extra damage. For your's you're actually gonna have to make a %chance command instead but you'll still have to make the array so you don't get any leaks with the floating texts. Still you array doesn't need to be more than 2 (even though i just wanna make sure and i figured 100 was a nice number)

Aside from that copy the floating text functions to make sure your floating texts works properly and is removed properly.

That's pretty much it; your's will look smaller than this but really it's a simple trigger that works...so yeah. GL with urs
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
The thing is that the Attacking Unit works before the unit is actually damaged. I hate it that An Unit is Damaged doesn't exist for all units and only for certain ones. I will try to make a system since I want to make some sort of Conversion spell which activates specifically when an unit is damaged.

~Daelin
 
Status
Not open for further replies.
Top