1. The contestants were to create water structures for the 20th Terraining Contest. Choose one in the public poll!
    Dismiss Notice
  2. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  3. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  4. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

[Solved] Passive Ability trigger fixing

Discussion in 'Triggers & Scripts' started by TheBigMetalHandInTheSky, Feb 25, 2017.

  1. TheBigMetalHandInTheSky

    TheBigMetalHandInTheSky

    Joined:
    Jan 14, 2017
    Messages:
    74
    Resources:
    0
    Resources:
    0
    Hello,
    I (tried to) create a trigger for a passive ability I made, but it doesn't seem to work. The passive ability is as follows:

    Gives the Blood Mage the ability Flame Armor; a passive ability that damages enemies near him and, when he attempts to attack, there is a 10/20/30% chance (depending on level) that he hurls a fireball at the target, dealing extra damage.

    Here is the trigger I made:

    • FA
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Level of Flame Armor (Neutral Hostile) for (Attacked unit)) Greater than 0
        • (Random integer number between 1 and 100) Equal to (15 x (Level of Flame Armor (Neutral Hostile) for (Attacking unit)))
        • Or - Any (Conditions) are true
          • Conditions
            • (Random integer number between 1 and 100) Less than or equal to (10 x (Level of Flame Armor (Neutral Hostile) for (Attacking unit)))
      • Actions
        • Unit - Create 1 Dummy for Neutral Passive at (Position of (Attacking unit)) facing (Position of (Attacked unit))
        • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        • Unit - Add Fireball for Flame Armor to (Last created unit)
        • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)
        • If ((Level of Flame Armor (Neutral Hostile) for (Triggering unit)) Greater than or equal to 1) then do (Unit - Add Permanent Immolation (Neutral Hostile 2) to (Triggering unit)) else do (Unit - Set level of Permanent Immolation (Neutral Hostile 2) for (Triggering unit) to (Level of Flame Armor (Neutral Hostile) for (Triggering unit)))


    How do I fix this in order for it to work?
     
  2. Jampion

    Jampion

    JASS Reviewer

    Joined:
    Mar 25, 2016
    Messages:
    1,285
    Resources:
    0
    Resources:
    0
    You need to check the level of flame armor for the attacking unit (the bloodmage).
    In the random condition it must be less than or equal to.
    Why do you have two random conditions?

    The last line should not be in this trigger. The permanent immolation has nothing to do with the bloodmage attacking.
    You should make a trigger, that adds immolation when he learns the skill flame armor.
     
  3. TheBigMetalHandInTheSky

    TheBigMetalHandInTheSky

    Joined:
    Jan 14, 2017
    Messages:
    74
    Resources:
    0
    Resources:
    0
    Ok, this works perfectly now.
    Thank you very much!