• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

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,407
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