• 🏆 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!

Jass/gui system needed...help?

Status
Not open for further replies.
Level 4
Joined
Mar 11, 2008
Messages
84
I need to detect when unit takes damage and detect the attacker. The system should be like this:

unit takes damage

set interger(atacking unit) = interger(atacking unit) + 1


if it could calculate the damage made...even better then..like

set interger(atacking unit) = interger(atacking unit) + damage made


so i cant jass...so it needs to be jass/gui combined.

this system would be part of my evolution map.
 
Level 13
Joined
Mar 16, 2008
Messages
941
It IS possible, there is a system here or on wc3c.
It uses the 'any unit takes damage'-event, and adds a frostorb with 0% to the attacker, so the orbbuff (you'll not see it, black icon and appears just for a part of a second) can only be detected of a physical attack :)
If you want all damage to count forget the orb part and make it like this:

  • Trigger1
  • E: A unit enters playable map
  • A: Add to Trigger2 the event (entering unit takes damage)
  • Trigger2
  • E: None, you add it in 1
  • A: set integer(PlayerID(Damage Source)) = integer(PlayerID(Damage Source)) + 1
 
Level 4
Joined
Mar 11, 2008
Messages
84
It IS possible, there is a system here or on wc3c.
It uses the 'any unit takes damage'-event, and adds a frostorb with 0% to the attacker, so the orbbuff (you'll not see it, black icon and appears just for a part of a second) can only be detected of a physical attack :)
If you want all damage to count forget the orb part and make it like this:

  • Trigger1
  • E: A unit enters playable map
  • A: Add to Trigger2 the event (entering unit takes damage)
  • Trigger2
  • E: None, you add it in 1
  • A: set integer(PlayerID(Damage Source)) = integer(PlayerID(Damage Source)) + 1

can you find the system pls? since iv been trying few systems but havent seen anything that could detect the atacker when unit is damaged...
 
Level 4
Joined
Mar 11, 2008
Messages
84
Erm, you have the event and can't find the attacker? DAMAGE SOURCE? oO

Ok...sorry if im dum :<, but I tought it seemed somewhat weird...i will test it now. Ty anyway.

*Edit* TY this really seems to work. I think i can start working with the map now.
 
Status
Not open for further replies.
Top