Damage detecting system

Status
Not open for further replies.
It is possible in GUI as well, but it would leak(one event for every new unit).
For instance:
Trigger 1
Events:
A unit enters playable map area
Actions
Add event to trigger 2 ( Triggering unit takes damage )

Trigger 2
Events:
- n/a -
Actions:
Show message to player # blah ...
 
If it would be possible to command to 'remember' a number, you could make a trigger that would save the amount of life of a unit every 0.02 seconds, then you wait 0.01 second and checks if the amount of life is lower then the saved amount. At the end of the trigger, you remove the saved number to prevent a massive leak.
 
There is only a 'Unit Is Attacked' event. Nothing with damage.

And in addition to my previous post: Make a trigger that saves the amount of life every X seconds (save it by using a variable), and make another trigger with Event 'Unit's life becomes less than <VARIABLE>'. Then you can add conditions/actions to it.

The bad thing is that the event only works on a specific unit.
 
There is only a 'Unit Is Attacked' event. Nothing with damage.
No, there's a Unit takes Damage event (EVENT_UNIT_DAMAGED in Jass).

It is just only available for "Specific unit events."

If it would be possible to command to 'remember' a number, you could make a trigger that would save the amount of life of a unit every 0.02 seconds, then you wait 0.01 second and checks if the amount of life is lower then the saved amount. At the end of the trigger, you remove the saved number to prevent a massive leak.
That's terribly inefficient, and reals don't leak.
 
but what if you're making an RPG?
what can you do if you need to set damage for all units. i tried but I still
think that it can not be done in GUI... if it can tell me. it would be great...
 
Status
Not open for further replies.
Back
Top