Revenge spell?

Molehole

New Member
Reaction score
2
Firstly sorry for typos/grammar as I'm Finnish :p
So I basically want to do revenge type of spell where you cast the spell and next time you take damage the attacking unit will take same amount of damage he did to the you. Did this sound bit too hard? I'll give an example.

Unit 1 and Unit 2 are fighting.

Unit 1 casts Revenge
Unit 2 deals 200 damage, unit 2 gets damaged for 200 damage.

Fight continues normally until Revenge is casted again.

---------------------------------

Currently I'm stuck at this point:

I did so that if my unit get attacked the enemy takes 100 damage to test it out. This works very well! But the problem comes when I change the damage done to "Damage taken". For some reason this doesn't work at all.

My trigger looks like this
---------------------------------

Event
unit is attacked
Conditions
((owner of (triggering unit)) controller) equals to user
Actions
Cause (triggering unit) to damage (attacking unit), dealing (damage taken) of attack type (spells) and damage taken (normal)

---------------------------------
I haven't yet done the spell part so the effect is constant just for testing purposes but it still doesn't work :S. I also read something that Damage taken responses only to Specific unit takes damage event but I also tried that and it didn't work. Help pretty please :)
 

Happy

Well-Known Member
Reaction score
71
its easy...

just take a damage detection system and trigger that if the spell is casted a boolean is set and another trigger registering whether the unit is damaged and then damage the damaging unit the same amount.

as a damage detection system i would recommend GDD (GUI-friendly damage detection) as i think you use GUI and not jass^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top