| 06-27-2005, 10:38 PM | #1 |
is there a way to detect the amount of damage they do to a unit? |
| 06-27-2005, 11:21 PM | #2 |
event - unit take damage |
| 06-27-2005, 11:26 PM | #3 |
That's not what he's asking. Untitled Trigger 001 Events Advanced - Any unit takes damage Conditions Actions Set RealVariable = (Damage taken) The Generic unit - Unit Takes Damage is not a regular GUI function, so you either need to make the trigger through JASS or get WEUnlimited. To find damage done, you use Event Response - Damage Taken, which is a real number. |
| 06-27-2005, 11:38 PM | #4 | |
Quote:
|
| 06-27-2005, 11:41 PM | #5 | |
Quote:
Does the guy look like he's worried about leaks to you, or if he was even capable of handling them? He doesn't know how to detect damage and you want to him to completely create a trigger through JASS. |
| 06-27-2005, 11:49 PM | #6 | |
Quote:
|
| 06-28-2005, 02:00 AM | #7 |
ok then. umm how does it create memory leaks and how do i do it without memory leaks? |
| 06-28-2005, 02:52 AM | #8 |
If you want to do it without memory leaks I believe you have to make the trigger, then do Trigger - Add Events for every single unit you want the trigger to run for, because there is only a native Specific Unit - Unit Takes Damage event. |
| 06-28-2005, 03:52 AM | #9 |
i think it would better if i just described my situtation. ok Im making it so when a unit picks up and item they will be labeled X (i.e. unit=udg_X). Now when that unit attacks an enemy the damage it does divided by 10 gets added to his current mana. I need to know how to get the thing in bold, thats it. |
| 06-28-2005, 06:51 AM | #10 | |
Quote:
Now, in another trigger, whenever a unit enters playable map area, add an event to the first trigger "specific unit event - entering unit takes damage". Additionaly, at map initialization, pick all preplaced units and add events for them as well. This method will make every unit leave an event in the first trigger, so if you have lots of units creted in the course of one game, it maybe could turn into a performance issue (I don't know how many "lots" is, though, perhaps this is not a problem in your map at all). To avoid this, you would have to use JASS... |
| 06-28-2005, 07:20 AM | #11 |
yes i would need to do jass because there are a lot of units, hundreds even. and i really need to it be a muti-instance kinda thing so mutiple people could have this item and get the same effect. |
