• 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.

i am confused ??? it should work

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
10%str buff only 1 time few heroes

UNSLOVED
OK help i need buff Hero that increases 10% str ONLY 1 time not infinite times on many units not only 1 ... thats the problem many units and not stacking efect. im stuck here
  • PurifyFire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to PurifyFire
    • Actions
      • Set PurifyFire_Unit = (Target unit of ability being cast)
      • Set PurifyFire_Str = (Strength of PurifyFire_Unit (Include bonuses))
      • Wait 1.00 seconds
      • Unit Group - Add PurifyFire_Unit to PurifyFire_RandomGroup
  • PurifyFireCheck
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit Group - Pick every unit in PurifyFire_RandomGroup and do (If (((Picked unit) has buff PurifyFireB ) Equal to True) then do (Hero - Modify Strength of (Picked unit): Set to ((Strength of (Picked unit) (Include bonuses)) + ((Strength of (Picked unit) (Include bonuses)) / 10))) else do (Do nothing))
          • Unit Group - Remove PurifyFire_Unit from PurifyFire_RandomGroup
          • Unit Group - Add PurifyFire_Unit to PurifyFire_RandomGroup_C
        • Else - Actions
          • Unit Group - Pick every unit in PurifyFire_RandomGroup_C and do (If (((Picked unit) has buff PurifyFireB ) Equal to False) then do (Hero - Modify Strength of (Picked unit): Set to ((Strength of (Picked unit) (Include bonuses)) - ((Strength of (Picked unit) (Include bonuses)) / 10))) else do (Do nothing))
          • Unit Group - Remove PurifyFire_Unit from PurifyFire_RandomGroup
UNSLOVED
 
Last edited:
Level 4
Joined
Jun 15, 2010
Messages
67
anyway else actions are when conditions are false
doesn't your else actions should be where then actions are?
 
Level 5
Joined
Feb 24, 2009
Messages
110
  • Purify Fire
    • Events
      • Unit - A unit Starts Effect of an ability
    • Condition
      • (Ability being cast) equal to PurifyFire
    • Actions
      • Set UnitCheckBuff = (Target unit of ability being cast)
      • Set Buff_Str = (strenght of UnitCheckBuff (Include bonuses)
      • If (all con's thrue ) then do (then ..) else do ( esle ... )
        • Conditions
          • ((UnitCheckBuff) has buff PurifyFire) Equal to True
          • Then - actions
          • Do nothing ( i didnt complete it >.. later that now to the problem):eekani:
          • Else - actions
          • Hero - Modify Strenght of UnitCheckBuff : Set to ((Strenght of UnitCheckBuff(Include bonuses)) + (Buff_Str / 10)
          • Wait 5.00 seconds
          • Hero - Modify Strenght of UnitCheckBuff : Set to ((Strenght of UnitCheckBuff(include bonuses)) - (buff_Str / 10)
put the whole thing inside [trigger ] [/ trigger] to make it easier ^^ (you can also right click the trigger, and select "copy as text", then place it inside the [*trigger] [*/trigger] without the *)
 
It doesn't work because ((UnitCheckBuff) has buff PurifyFire) Equal to True.
Naturally the buff appears AFTER you have cast the spell so the condition isn't true, and then triggers the 'Else' actions. I don't even understand why you used that condition, it's like:
  • Example
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Attacked unit) Equal to (Attacked unit)
        • Then - Actions
        • Else - Actions
          • <YOUR ACTIONS>
It is a pointless condition.
 
Level 8
Joined
Oct 3, 2008
Messages
189
You could add your unit to a custom unit group upon casting the spell.

Then use a periodic trigger that goes over all units in said unit group, checks if they still have the buff; if not, remove them from the group and reduce their strength again.
 
Level 7
Joined
May 18, 2010
Messages
264
i need this trigger so i can continue the spell tree please. i know its hard but som1 contribute :)
 
Status
Not open for further replies.
Top