• 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.

Suggestions for Dmage Detection

Status
Not open for further replies.
Level 14
Joined
Jul 26, 2008
Messages
1,009
I've been perusing the boards down at wc3c and here at hive in search of a Damage Detection system. Most all of them are strictly in vJASS, which is a tad bit intimidating for me, though I'm becoming more confident with using vJASS.

With so many to choose from I was hoping someone could point me out to a good one that would allow me to do triggered evasion, life steal crits, damage shields, and other things of that nature.

Orbs aren't really a big deal for me either.

Hopefully I can figure out how to use it properly in my map.
 
Level 6
Joined
Jul 24, 2008
Messages
180
You can detect damage in GUI if the unit is created in triggers or pre-placed on the map. You just need to use-
  • Actions
    • Unit - Create 01 Footman at (Center of (Playable Map Area)) facing (Default facing degrees)
    • Set Unit = (Last Created Unit)
    • Trigger - Add Unit takes damage to Trigger <Gen>
Damage Taken is also under Math (If not integers then reals) I believe, so you can calculate the exact damage.
 
Detecting the real original damage is a mess, but there are systems on wc3c for this afaik.

A damage detection system itself is VERY easy.
You need two triggers.
One at map initialization that adds all units that are currently on the map
to the trigger with a pick-loop and the event T4Co mentioned above.

The other one does the same, but whenever a unit enters the playable
map area. Now you got all units in your system,
but this will leak events if units get removed, but not the events.

Either you accept these leaks, or you destroy the trigger (and create a new one),
what can cause problems if the trigger wasn't shut down for some time.
 
Status
Not open for further replies.
Top