• 🏆 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!

[Solved] Dummy - Giving a buff to a unit, Isnt working

Status
Not open for further replies.
Level 2
Joined
Sep 20, 2010
Messages
10
Okay so heres the trigger, is there any problem with it??

  • Hunger Buff
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set UnitHungry[1] = (Units of type Doctor)
      • Set UnitHungry[2] = (Units of type Farmer)
      • Set UnitHungry[3] = (Units of type Mechanic)
      • Set UnitHungry[4] = (Units of type Veteran Soldier)
      • Set UnitHungry[5] = (Units of type Veteran Soldier1)
      • Set Integer = (Random integer number between 1 and 5)
      • Unit Group - Pick every unit in UnitHungry[Integer] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Integer((Life of (Picked unit)))) Less than 500) and (((Picked unit) has buff Hunger ) Equal to False)
            • Then - Actions
              • Unit - Create 1 Dummy for Neutral Hostile at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
            • Else - Actions
              • Do nothing
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Level 2
Joined
Sep 20, 2010
Messages
10
Unfortunately things are still the same, nothing's happening, like when it reaches the desired health, the dummy spawns but it doesnt cast 'Bloodlust'..
 
Level 5
Joined
Nov 30, 2012
Messages
200
Is the ability based off of Bloodlust? If not, you'll have to change the order string key (or whatever it's called). That's all I can think of that hasn't been mentioned already.
 
Level 2
Joined
Sep 20, 2010
Messages
10
Which player are the units owned by? Bloodlust by default can't target enemies or even allies, only unit of the same player.

Try setting "enemy" in the targets allowed for the ability. If that does not work, create the dummy for owner of the picked unit.

Yeah i already made the setting enemy in the targets allowed, nothing happening.. Later ill send you the map and hopefully you can fix it
 
Level 6
Joined
Nov 24, 2012
Messages
218
All the checks compiled:
1. Set unit group array size to 5+
2. Dummy must have bloodlust (someone says add by trigger instead of default)
3. Bloodlust must have target enemy, no techtree requirements or mana
4. If doesn't work, make dummy owner = same owner as owner of picked unit

Other notes:
1. Unit group leak + location leak
2. Don't need the "Do Nothing"
3. Declaring those variables should be put in another trigger and run once
4. Add expiration timer before doing the spell order to be safe, because orders aren't always instant (dummy facing angle) but you will be fine in this specific example only because the dummy unit spawns on top of the target.
 
Status
Not open for further replies.
Top