Template On Attack Template 1.30

Discussion in 'Systems and Snippets' started by emjlr3, Feb 2, 2007.

  1. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    maybe one day, heh
     
  2. waaaks!

    waaaks! Zinctified

    Ratings:
    +256 / 0 / -0
    now u got this, can u make a damage detection system in vjass?
     
  3. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    updated
     
  4. waaaks!

    waaaks! Zinctified

    Ratings:
    +256 / 0 / -0
    nc, just what i need, vjass
     
  5. Nathan0093

    Nathan0093 New Member

    Ratings:
    +4 / 0 / -0
    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.
     
  6. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    you have to use the On_Attack_Template_Function() call, this requires JASS, but its all explained in the Read Me
     
  7. Nathan0093

    Nathan0093 New Member

    Ratings:
    +4 / 0 / -0
    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 :)
     
  8. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    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
     
    • Like Like x 1
  9. Nathan0093

    Nathan0093 New Member

    Ratings:
    +4 / 0 / -0
    ^ Ah no problem. In fact I'm glad that youre even helping out ;)
     
  10. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    updated
     
  11. Trithilon-V2

    Trithilon-V2 New Member

    Ratings:
    +20 / 0 / -0
    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?
     
  12. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    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
     
  13. Nathan0093

    Nathan0093 New Member

    Ratings:
    +4 / 0 / -0
    ^ 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?
     
  14. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    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
     
  15. Trithilon-V2

    Trithilon-V2 New Member

    Ratings:
    +20 / 0 / -0
    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.
     
  16. Trithilon-V2

    Trithilon-V2 New Member

    Ratings:
    +20 / 0 / -0
    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?
     
  17. Trollvottel

    Trollvottel never aging title

    Ratings:
    +261 / 0 / -0
    I guess you dont have the Jass NewGen Pack
     
  18. Trithilon-V2

    Trithilon-V2 New Member

    Ratings:
    +20 / 0 / -0
    I dun hav newgen.
    Newgen or not, wc3 shud be able to play the map right?
     
  19. Flare

    Flare Stops copies me! Staff Member

    Ratings:
    +662 / 0 / -0
    Maybe emjlr3 didn't enable custom forces, and didn't alter the Grimoire test map settings. just get NewGen and test it that way?
     
  20. emjlr3

    emjlr3 Change can be a good thing Staff Member

    Ratings:
    +396 / 0 / -0
    what??
     

Share This Page