• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

help D:

Status
Not open for further replies.
Level 11
Joined
Apr 5, 2009
Messages
728
  • Regen Aura
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Regen Aura [level 1]) Equal to True
      • ((Attacking unit) has buff Regen Aura [level 2]) Equal to True
      • ((Attacking unit) has buff Regen Aura [level 3]) Equal to True
    • Actions
      • If (((Attacking unit) has buff Regen Aura [level 1]) Equal to True) then do (Set LeveL = 1) else do (Do nothing)
      • If (((Attacking unit) has buff Regen Aura [level 2]) Equal to True) then do (Set LeveL = 2) else do (Do nothing)
      • If (((Attacking unit) has buff Regen Aura [level 3]) Equal to True) then do (Set LeveL = 3) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (LeveL x 4) Greater than or equal to (Random integer number between 1 and 100)
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + ((Real(LeveL)) x 15.00))
          • Special Effect - Create a special effect attached to the origin of (Attacking unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
        • Else - Actions
pls help me with it. .cause it does'nt work. .the healing doesnt work. . D:
 
Ahm, use this:

  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Buff[1] = (Regen Aura (Level 1))
    • Set Buff[2] = (Regen Aura (Level 2))
    • Set Buff[3] = (Regen Aura (Level 3))
"Buff" variable is of type "Buff".

  • Trigger2
  • Events
    • A unit is attacked
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 3, do (Actions)
      • Loop - Actions
        • If/ Then/ Else
          • If (Conditions)
            • (Attacking unit) has Buff[IntegerA] Equal to True
          • Then (Actions)
            • Set Level = IntegerA
            • If/ Then/ Else
              • If (Conditions)
                • Random Integer number between 1 and 100 Less than or Equal to (4*(Level))
              • Then (Actions)
                • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + ((Real(Level) x 15.00))
                • Special Effect - Create a special effect attached to the origin of (Attacking unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
                • Special Effect - Destroy (Last created special effect)
                • Else - Actions
      • Else - Actions
 
  • Regen Aura
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Regen Aura [level 1]) Equal to True
      • ((Attacking unit) has buff Regen Aura [level 2]) Equal to True
      • ((Attacking unit) has buff Regen Aura [level 3]) Equal to True
    • Actions
      • If (((Attacking unit) has buff Regen Aura [level 1]) Equal to True) then do (Set LeveL = 1) else do (Do nothing)
      • If (((Attacking unit) has buff Regen Aura [level 2]) Equal to True) then do (Set LeveL = 2) else do (Do nothing)
      • If (((Attacking unit) has buff Regen Aura [level 3]) Equal to True) then do (Set LeveL = 3) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (LeveL x 4) Greater than or equal to (Random integer number between 1 and 100)
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + ((Real(LeveL)) x 15.00))
          • Special Effect - Create a special effect attached to the origin of (Attacking unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
        • Else - Actions
pls help me with it. .cause it does'nt work. .the healing doesnt work. . D:

I don't really understand this trigger entirely.. but keep in mind that "if"s require ALL the conditions to be true, if you want the trigger to run when the attacker fills just any of those conditions, you need an OR.
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
I don't really understand this trigger entirely.. but keep in mind that "if"s require ALL the conditions to be true, if you want the trigger to run when the attacker fills just any of those conditions, you need an OR.

aaaah there you go... (i am so stupid not seeing this :sad: )

To run this trigger needs a unit which has buff lvl 1, lvl 2 AND lvl 3 at the same time.

Just add an "or" in the condition.
 
Status
Not open for further replies.
Top