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
396
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
396
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
396
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
396
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.
  • V-SNES V-SNES:
    Happy Sunday!
    +1
  • ToshibaNuon ToshibaNuon:
    Happy sunday!
    +2
  • The Helper The Helper:
    And its Friday!
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
  • The Helper The Helper:
    Happy Monday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Happy Friday!
    +1
  • tom_mai78101 tom_mai78101:
    Starting this upcoming Thursday, I will be in Japan for 10 days.
  • tom_mai78101 tom_mai78101:
    Thursday - Friday will be my Japan arrival flight. 9 days later, on a Sunday, will be my return departure flight.
    +2
  • The Helper The Helper:
    Hope you have safe travels my friend!
    +1
  • vypur85 vypur85:
    Wow spring time in Japan is awesome. Enjoy!
  • The Helper The Helper:
    Hopefully it will be more pleasure than work
  • vypur85 vypur85:
    Recently tried out ChatGPT about WE triggering. Wow it's capable of giving a somewhat legitimate response.
  • The Helper The Helper:
    I am sure it has read all the info on the forums here
  • The Helper The Helper:
    i think triggering is just scripting and chatgpt is real good at code
  • vypur85 vypur85:
    Yeah I suppose so. It's interesting how it can explain in so much detail.
  • vypur85 vypur85:
    But yet it won't work.
  • The Helper The Helper:
    it does a bad ass job doing excel vba code it has leveled me up at my job when I deal with excel that is for sure
  • vypur85 vypur85:
    Nice! I love Excel coding as well. Has always been using Google to help me. Maybe I'll use ChatGPT next time when I need it.
  • The Helper The Helper:
    yeah whatever it puts out even if it is not perfect I can fix it and the latest version of chatgpt can create websites from pictures it will not be long until it can do that with almost all the tools
    +1
  • The Helper The Helper:
    These new Chat AI programs are going to change everything everyone better Buckle the Fuck Up!
  • The Helper The Helper:
    oh and Happy Tuesday Evening! :)

    The Helper Discord

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top