Template On Attack Template 1.30

Nathan0093

New Member
Reaction score
4
I got a question. How do I detect the damage dealt by the attacking unit and make it cause some extra damage under a condition? This is what I had, and it didnt work:
Code:
Test Trigger
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Triggering unit)) Equal to (==) Footman
        (Unit-type of (Attacking unit)) Equal to (==) Knight
    Actions
        Custom script:   call On_Attack_Template_Damage(GetAttacker(),GetTriggerUnit(),GetEventDamage(),true)
What I'm trying to do here is to make the attacking unit deals the same amount of damage again to the attacked unit.
 

emjlr3

Change can be a good thing
Reaction score
395
you have to use the On_Attack_Template_Function() call, this requires JASS, but its all explained in the Read Me
 

Nathan0093

New Member
Reaction score
4
I read the Read Me 2 section and I recognized that the "GetEventDamage" is used to return the damage done. I dont really know Jass so could you be kind and show me how to do it? I just need to be able to get the damage done by an attacking unit :)
 

emjlr3

Change can be a good thing
Reaction score
395
possibly tmr I will add an example of using that function to the map

I had one there but I thought it was too complicated

thanx for your patience
 

Trithilon-V2

New Member
Reaction score
20
Awww gawd...did u save it wc3 tft ver 1.21? this is not workin for me, map not loadin...
Well there can be a major exploit in this system....i.e if a unit has immolation which damages the unit every 0.1 secs, then the system will just be fooled by the immolation damage to be the attack damage right?
 

emjlr3

Change can be a good thing
Reaction score
395
well yea, that is one of the limitations, though I think the fact that GUIers can use this as an attack detection method outweighs that, considering its a product of the method, not a flaw in the code

and the map should work fine, newest version patch and version if JNGP
 

Nathan0093

New Member
Reaction score
4
^ I just downloaded the updated tutorial and I cant still figure out how to get the damage taken. I really don't know Jass. Can you please help me?
 

emjlr3

Change can be a good thing
Reaction score
395
look at trigger Demo 4

shows how to do it

if you can't figure it out from there, i suggest u read a few tuts to help you along the way
 

Trithilon-V2

New Member
Reaction score
20
Dude i cant see any players when i open the map niether can i save the map cuz of errors......whats the problem.....
I have wc2 1.20e stand alone installation.
 

Trithilon-V2

New Member
Reaction score
20
Btw i wud really like to know how you made it?
I mean do you use current orders of the units to determine it?
does it detect orb casts and auto attacks and spells?
 
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