1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Join the 6th Melee Mapping Contest for a chance to have your map featured in this year's Hive Cup!
    Dismiss Notice
  4. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  5. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  6. Let your favorite entries duke it out in the 15th Techtree Contest Poll.
    Dismiss Notice
  7. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Creating some basic abilities

Discussion in 'Trigger (GUI) Editor Tutorials' started by paskovich, Apr 22, 2007.

  1. Neruvatar

    Neruvatar

    Joined:
    Nov 25, 2014
    Messages:
    505
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The knockback spell doesn't work! What happened?
     
  2. UnBorN

    UnBorN

    Joined:
    Jul 29, 2017
    Messages:
    1
    Resources:
    0
    Resources:
    0
    guys i made are damaging spell with "Deal damage based on hero’s attribute points" part of the code but then it damages my units in the area too any idea what condition i need to add for preventing allied units taking damage from that spell ?
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,047
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Add to either the unit search filter or the for group loop a test to check if the filter/picked unit owner is an ally of the casting/triggering unit owner.

    If you use the damage unit in area action then it is not possible, it will damage all units in the area.
     
  4. Silva

    Silva

    Joined:
    Feb 6, 2015
    Messages:
    223
    Resources:
    0
    Resources:
    0
    Really helpful! Thanks!
     
  5. IIICatalystIII

    IIICatalystIII

    Joined:
    Mar 9, 2019
    Messages:
    2
    Resources:
    0
    Resources:
    0
    What I am trying to do is 20% chance on hit, attacking hero casts chain lightning on attacked unit, doing this without a dummy unit.
    So far I have this...
    [​IMG]

    In the regen aura, it uses arithmetic to reach the health gained.
    If I am trying to have the multiple ranks, would I be better off making 3 different chain lightnings and adding a new buff for each rank of the aura? The chance would always be 20%, but each rank increases in damage and targets to chain.
    If attacking unit has <buff(rank)> then casting unit casts chain lightning(rank) to attacked unit
    Would this work?
    ____________________________________
    Edit: I solved my problem and here's how I did it.
    [​IMG]

    Silly me didn't know that you could just set the level of the ability, which makes me curious why the author did arithmetic when they could have just sorted that in the ability?
    As for Chain Lightning, there is no one I could find to trigger a unit to open a spellbook, and what I want to do is to try to keep Chain Lightning hidden since it costs 0 mana and no cd (very op!)
    To do this I just added the ability, waited some time, found that if I did not put a wait sometimes it would not cast, not sure why.
    Added a 1s before removing the ability because it took about 1s for the unit to cast the ability once it was added.

    Plus a player could try to cast it before the unit did, but it would not cast twice, so it didn't matter if this player cast it or the trigger did.

    I am worried if this will lead to a data leak, but so far it works!
     
    Last edited: Aug 2, 2019