1. Choose the best Old Gods themed skin at the Texturing Contest #29 - Poll!
    Dismiss Notice
  2. Melee Mapping Contest #2 - Poll is up! Vote for the best competitive 1v1 map!
    Dismiss Notice
  3. Please help test custom maps and more on the latest PTR!
    Dismiss Notice
  4. Evolution complete! Make Darwin proud and go vote in the Techtree Contest #12 - Poll.
    Dismiss Notice
  5. Icon Contest #17 - Results are out! Step by to congratulate our winners!
    Dismiss Notice
  6. We've created the Staff Job Openings thread. We're currently in need of icon, video production, and social/multimedia positions to be filled. Thank you!
    Dismiss Notice

Custom Ability

Discussion in 'World Editor Help Zone' started by Augustus_Magnus, Aug 12, 2018.

  1. Augustus_Magnus

    Augustus_Magnus

    Joined:
    Jun 2, 2016
    Messages:
    103
    Resources:
    3
    Maps:
    3
    Resources:
    3
    Hello Hivers,
    I'm currently working on a custom hero that has an ability, Chaos, that changes the casters atributes.
    Level 1: +1 strength
    Level 2: +1 strength and +1 agility
    Level 3: +1 strength, +1 agility and +1 intelligence

    I've got so far:
    [​IMG]

    But I can't find a condition for the level of the ability.

    ---EDIT---

    Thank you very much for your help. I've made the ability work.
     
    Last edited: Aug 13, 2018
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    1,567
    Resources:
    0
    Resources:
    0
    It's there. If you're going to use if-blocks it's an integer comparison. Maybe this is dumb but this isn how I would write the stat boost logic instead of using a bunch of if-trees

    • Set Level = (Level of YourAbil for (Triggering Unit)
    • Set StrMod = 1
    • Set AgiMod = Min(1, Max(0, Level-1))
    • Set IntMod = Min(1, Max(0, Level-2))
    • Hero - Modify Strength of (Triggering Unit) add StrMod
    • Hero - Modify Agility of (Triggering Unit) add AgiMod
    • Hero - Modify Intelligence of (Triggering Unit) add IntMod


    Use "starts the effect of an ability" for all of your spellcast triggers; the others fire at slightly different times in the cast sequence and some can be exploited. Use Triggering Unit wherever possible.
     
  3. Wark

    Wark

    Joined:
    Oct 12, 2016
    Messages:
    711
    Resources:
    2
    Maps:
    2
    Resources:
    2
    You can do this with some creative editing of the Attribute Bonus hero ability, no need for triggers.
     
  4. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    1,567
    Resources:
    0
    Resources:
    0
    It's not a passive bonus, the OP wants the ability to increase those stats every time it's cast.
     
  5. Wark

    Wark

    Joined:
    Oct 12, 2016
    Messages:
    711
    Resources:
    2
    Maps:
    2
    Resources:
    2
    ah, OK.