• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Need help with Trigger

Status
Not open for further replies.
Level 9
Joined
Jan 11, 2009
Messages
282
Hi guys, I have a simple trigger here, it should heal your unit by 100 * Level but it has a little change to damage it with 200 * Level. When I cast the Spell it won't even heal me.. Here is the code:

  • Events
    • Einheit - A unit stops casting an Ability
  • Conditions
    • (Ability being cast) Gleich Trickery Heal
  • Actions
    • Set HealAmount = 100
    • Set Caster = (Triggering unit)
    • Set HealedUnit = (Target unit of ability being cast)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Bedingungen
        • (Level of (Ability being cast) for Caster) equal 1
      • 'THEN'-Aktionen
        • Set HealChance = 50
      • 'ELSE'-Aktionen
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Bedingungen
        • (Level of (Ability being cast) for Caster) equal 2
      • 'THEN'-Aktionen
        • Set HealChance = 60
      • 'ELSE'-Aktionen
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Bedingungen
        • (Level of (Ability being cast) for Caster) Greater equal 3
      • 'THEN'-Aktionen
        • Set HealChance = 70
      • 'ELSE'-Aktionen
    • Set temp = (Random integer number between 0 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Bedingungen
        • temp Kleiner gleich HealChance
      • 'THEN'-Aktionen
        • Einheit - Set life of HealedUnit to ((Life of HealedUnit) + ((Real(HealAmount)) x (Real((Level of (Ability being cast) for Caster)))))
      • 'ELSE'-Aktionen
        • Einheit - Set life of HealedUnit to ((Life of HealedUnit) - ((Real(HealAmount)) x (Real((Level of (Ability being cast) for Caster)))))
Please help !
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

I can help you with this trigger: (I hope I understand you correct)

  • HealOrDamageSpell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to TestAbility1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Greater than or equal to (40 + ((Level of (Ability being cast) for (Casting unit)) x 10))
        • Then - Actions
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (100.00 x (Real((Level of (Ability being cast) for (Casting unit))))))
        • Else - Actions
          • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (200.00 * (Real((Level of (Ability being cast) for (Casting unit))))) damage of attack type Spells and damage type Normal
Note: The ability has 3 levels. The ability has a change of 50%/60%/70% to heal one target by 100 * ability level and a change of 50%/40%/30% to damage it.
I tested it 50 times - and the random effect is given - sometimes heal sometimes damage
 
Level 10
Joined
Jan 24, 2009
Messages
606
hmm... Then Try something differant:p Like putting the heal in else and Damage in Then..... (probelly easier:p)

(what i ment was that That's the Reason why U deal damage more offtent then healing...)
 
Last edited:
Status
Not open for further replies.
Top