• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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 33
Joined
Mar 27, 2008
Messages
8,035
I set the targeted skill can be casted onto allies, self, and enemies
Since you want it to be -buff and +buff of Strength, I only made the trigger to effect ONLY heroes (lol yeah, normal unit DON'T HAVE STATS!)
 

Attachments

  • Buffering Spell.w3x
    17.1 KB · Views: 34
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 7
Joined
Oct 3, 2008
Messages
183
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