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

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