| 11-28-2005, 08:13 PM | #1 |
i want it to display the damage of the unit that caused it heres what i have Code:
Events
Advanced - Any unit takes damage
Actions
Floating Text - Create floating text that reads (String((Damage taken))) at (Position of (Damage source)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 30.00 towards 90.00 degrees
Wait 2.00 seconds
Floating Text - Destroy (Last created floating text) |
| 12-19-2005, 02:07 PM | #2 |
So...? It doesn't work? What is the question here? |
| 12-19-2005, 02:27 PM | #3 |
http://www.wc3jass.com/viewtopic.php?t=2386 This function works perfectly for creating floating text and isn't hard to call, just check Vexorian's tutorial on this site. I don't know if the floating text thing was the problem, since you didn't specify it. |
| 12-20-2005, 07:57 AM | #4 |
If you want this texttag to be multiinstanceable, never. NEVER use (Last created floating text) mate! ![]() |
| 12-20-2005, 08:53 AM | #5 |
You can easily display a unit's damage by giving it a critical strike ability with 100% chance of working and damage multiplier of 1 (so the damage stays the same). |
| 12-20-2005, 11:06 PM | #6 |
I believe judging from his trigger that he wants to display any damage taken, including the damage from spells etc. However as i'm unaware with how WEU's "Advanced - Any unit takes damage event" function's its difficult to judge why this isn't working. I am sceptical however regarding WC's ability to measure the damage a unit just took (as he does) , I've always thought it wasn't possible to simply detect that value. |
| 12-20-2005, 11:11 PM | #7 |
The "Damage taken" event response is avaliable since a recent patch. However, I've seen people have problems getting it to work with the WEU advanced event before, it's possible that it does not work correctly at all. You can try with the specific unit event, just add specific unit events to your damage detect trigger whenever you create a unit so it works for that unit as well. |
| 12-20-2005, 11:23 PM | #8 | |
Quote:
|
| 12-20-2005, 11:24 PM | #9 |
I guess it's become ingrained with me that WC couldn't specifically tell you how much damage a unit took from an attack. I guess it's a problem when you've worked with the (evolving) editor, you subconciously don't explore certain development paths because they didn't *used* to work back in oh, 1.05 .Guess i better reread the patch log a few times, just to make sure i remember everything thats changed. |
