1. Evolution complete! Make Darwin proud and go vote in the Techtree Contest #12 - Poll.
    Dismiss Notice
  2. Icon Contest #17 - Results are out! Step by to congratulate our winners!
    Dismiss Notice
  3. Succumb to the whispers and join our Texturing Contest #29 - Old Gods!
    Dismiss Notice
  4. The results for Texturing Contest #28 are out! Step by to congratulate our winners!
    Dismiss Notice
  5. 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
  6. On May 20th a new law about privacy and data processing comes into work in the EU. I am no lawyer and I need help figuring out if we comply and if not, what we must do about it. Please message me if you can provide any assistance. Read more. Ralle
    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,057
    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:
    683
    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,057
    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:
    683
    Resources:
    2
    Maps:
    2
    Resources:
    2
    ah, OK.