1. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  2. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  3. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    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:
    104
    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,734
    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:
    738
    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,734
    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:
    738
    Resources:
    2
    Maps:
    2
    Resources:
    2
    ah, OK.