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

[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,277
    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!