1. Join Texturing Contest #30 now in a legendary battle of mythological creatures!
    Dismiss Notice
  2. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  3. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  4. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    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:
    2,155
    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:
    2,155
    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.