• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Help with buff ability when allied unit dies

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
hey >:D I need help triggering an ability which when any allied unit with in 650 range of the hero dies a dummy unit casts inner fire and bloodlust on the hero, so far I've come up with this which doesn't work;

  • AvengeroftheForests
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Summon Forest Stalkers ( Avenger )
    • Actions
      • Set TempUnit = (Learning Hero)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire (Neutral Hostile)
      • Set AbilityAdd2 = Bloodlust (Neutral Hostile 1)
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of Player_Owner) Equal to True) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd to (Last created unit)
              • Unit - Add AbilityAdd2 to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
which is flabbergasting since I can't think of any way else to make it work due to my inexperience and there fore any help on the matter would be greatly appreciated. :)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Your trigger only runs when the Hero learned the skill.
Pseudocode:
Event should be A unit Dies.
Action should consists of Pick Every Unit within 650 of dying unit
If picked unit's ability level for Avenger > 1 then
cast Bloodlust, etc. on the picked unit using a dummy unit.

Well that got things working how ever the problem now is that my hero gets the buffs(the innerfire and bloodlust effects) just berfore the unit dies and then keeps receiving it constantly (it doesn't stack) but it is constantly casted on the hero.

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempUnit = (Dying unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire (Neutral Hostile)
      • Set AbilityAdd2 = Bloodlust (Neutral Hostile 1)
      • Unit Group - Pick every unit in (Units within 650.00 of (Position of TempUnit) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of Player_Owner) Equal to True) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Summon Forest Stalkers ( Avenger ) for (Picked unit)) Equal to 1
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd to (Last created unit)
              • Unit - Add AbilityAdd2 to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
You might have set the duration to 0... which is infinite instead of actual 0 seconds :D
Also, you have to give your dummy unit an expiration timer of at least 0.01. (because 0 doesnt work there either)

More than that, I cannot think of.
If you showed the trigger, then we can take a closer look.
 
Level 9
Joined
Jun 10, 2013
Messages
473
You might have set the duration to 0... which is infinite instead of actual 0 seconds :D
Also, you have to give your dummy unit an expiration timer of at least 0.01. (because 0 doesnt work there either)

More than that, I cannot think of.
If you showed the trigger, then we can take a closer look.

yeah sorry I meant too. I added to the last comment.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Well that got things working how ever the problem now is that my hero gets the buffs(the innerfire and bloodlust effects) just berfore the unit dies and then keeps receiving it constantly (it doesn't stack) but it is constantly casted on the hero.

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempUnit = (Dying unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire (Neutral Hostile)
      • Set AbilityAdd2 = Bloodlust (Neutral Hostile 1)
      • Unit Group - Pick every unit in (Units within 650.00 of (Position of TempUnit) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of Player_Owner) Equal to True) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Summon Forest Stalkers ( Avenger ) for (Picked unit)) Equal to 1
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd to (Last created unit)
              • Unit - Add AbilityAdd2 to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
If you want some delay, just add Wait at the start of the Action and make sure you use Triggering Unit instead of Dying Unit.

You want the buff to stack? Bloodlust doesn't stack unfortunately, only refreshes the duration. About Inner Fire, I have no idea what it does, is that a Human Ability?

If you want it to stack, you have to trigger the Stacking mechanics maybe using levels which indicate the current stack.

Oh and in your trigger, If-Then condition should be level > 0
Furthermore, create a Condition which is Unit-Type of Triggering Unit Not Equal to Unit type of your dummy.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
"(Units within 650.00 of (Position of TempUnit)" Please, you have a location variable... USE IT!
(You also leak that location.)

Also, dont use the matching stuff. Just pick all units in a certain range and do an If/Then/Else inside the loop.
I just cant (wont actually) read it.

The inner fire spell may not be cast if either the dummy or the spell are not set up properly.

The dummy unit is the one that dies... which will re-start that trigger but then for the dummy unit instead of a normal unit.
Try checking if the dying unit's unit type is not equal to the dummy type.
(I know this is very intuitive but that should solve it for now.)
 
Level 9
Joined
Jun 10, 2013
Messages
473
If you want some delay, just add Wait at the start of the Action and make sure you use Triggering Unit instead of Dying Unit.

You want the buff to stack? Bloodlust doesn't stack unfortunately, only refreshes the duration. About Inner Fire, I have no idea what it does, is that a Human Ability?

If you want it to stack, you have to trigger the Stacking mechanics maybe using levels which indicate the current stack.

Oh and in your trigger, If-Then condition should be level > 0
Furthermore, create a Condition which is Unit-Type of Triggering Unit Not Equal to Unit type of your dummy.

Made the suggested changes and no idon't want it to stack was just saying that it was casted on the hero multiple times but was not stacking so there isn't an additional issue and it is the human priests 3rd ability

"(Units within 650.00 of (Position of TempUnit)" Please, you have a location variable... USE IT!
(You also leak that location.)

Also, dont use the matching stuff. Just pick all units in a certain range and do an If/Then/Else inside the loop.
I just cant (wont actually) read it.

The inner fire spell may not be cast if either the dummy or the spell are not set up properly.

The dummy unit is the one that dies... which will re-start that trigger but then for the dummy unit instead of a normal unit.
Try checking if the dying unit's unit type is not equal to the dummy type.
(I know this is very intuitive but that should solve it for now.)
used the temppoint thanks for pointing that out and I will fix the leak

and if I don't use matching then wouldn't it work if enemies are killed (which I don't want)

the dummy unit is fine and the only thing I have to do for the dummy ability besides 0 mana and unlimited cast range is?

and any and all help is appreciated no matter how intuitive, its the gesture that counts :D

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire (Neutral Hostile)
      • Set AbilityAdd2 = Bloodlust (Neutral Hostile 1)
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of Player_Owner) Equal to True) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Summon Forest Stalkers ( Avenger ) for (Picked unit)) Greater than 0
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd to (Last created unit)
              • Unit - Add AbilityAdd2 to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
            • Else - Actions
and as the current trigger stands it seems to now randomly activate when nearby units enter into combat and starts casting the dummy abilities non-stop on my hero causing an over load of lags
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
and if I don't use matching then wouldn't it work if enemies are killed (which I don't want)
I said an If/Then/Else to do the checks.
You already have one, you just have to make it larger.

the dummy unit is fine and the only thing I have to do for the dummy ability besides 0 mana and unlimited cast range is?
I thought you said that he gets it constantly.
In any case, yes that is basically what an ability requires for that.

Does it work properly now?
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
You're running an infinite loop here. When the dummy dies, it will run the trigger again, create a dummy again and it will die after 0.01 second and the cycle continues. Add a condition thaf checks if the "dying unit" is not a dummy unit type. And it leaks a location. Every 0.01 sec leaks a location, you're gonna have a bad time.

Also, you have redundant function calls
 
Level 9
Joined
Jun 10, 2013
Messages
473
I said an If/Then/Else to do the checks.
You already have one, you just have to make it larger.


I thought you said that he gets it constantly.
In any case, yes that is basically what an ability requires for that.

Does it work properly now?

oh so you could just add as many conditions as you like to the if/the/else?

and I believe I misunderstood you about the dummy unit if your trying to say what flux said about the dumy unit;

You're running an infinite loop here. When the dummy dies, it will run the trigger again, create a dummy again and it will die after 0.01 second and the cycle continues. Add a condition thaf checks if the "dying unit" is not a dummy unit type. And it leaks a location. Every 0.01 sec leaks a location, you're gonna have a bad time.

Also, you have redundant function calls
fixed the leak (can't believe I didn't see that XD so thanks)
and redundant function calls?

oh so you could just add as many conditions as you like to the if/the/else?

and I believe I misunderstood you about the dummy unit if your trying to say what flux said about the dumy unit;


fixed the leak (can't believe I didn't see that XD so thanks)
and redundant function calls?

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire (Neutral Hostile)
      • Set AbilityAdd2 = Bloodlust (Neutral Hostile 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is alive) Equal to True
          • ((Triggering unit) belongs to an ally of Player_Owner) Equal to True
          • ((Triggering unit) is A structure) Equal to False
          • (Level of Summon Forest Stalkers ( Avenger ) for (Picked unit)) Greater than 0
        • Then - Actions
          • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
          • Unit - Add AbilityAdd to (Last created unit)
          • Unit - Add AbilityAdd2 to (Last created unit)
          • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
          • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Last edited by a moderator:
Level 23
Joined
Feb 6, 2014
Messages
2,466
Wut?? Where's the Unit-Group??

You repetitively call (Last Created Unit), (Picked Unit) so if you want some minor speed gain (or if your OCD kicks in), store those into a variable so you only need to call it once.
Also the If-Then Else Condition should reference the Picked Unit not the Triggering Unit.

And again -_- recursive trigger man!
 
Level 9
Joined
Jun 10, 2013
Messages
473
Wut?? Where's the Unit-Group??

You repetitively call (Last Created Unit), (Picked Unit) so if you want some minor speed gain (or if your OCD kicks in), store those into a variable so you only need to call it once.
Also the If-Then Else Condition should reference the Picked Unit not the Triggering Unit.

And again -_- recursive trigger man!


will fix the picked unit reference and will do the variable storing

and I thought wietol said to take out the unit group and just do conditions?

and i'm terribly sorry but I don't know what on earth a "recursive trigger means"
If it means about what you said for it not working upon the dummy units death well I can't figure out how to do that

and helping me must be like teaching a blind man how to paint (which is possible by the way).

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire (Neutral Hostile)
      • Set AbilityAdd2 = Bloodlust (Neutral Hostile 1)
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) is alive) Equal to True
          • ((Picked unit) belongs to an ally of Player_Owner) Equal to True
          • ((Picked unit) is A structure) Equal to False
          • (Level of Summon Forest Stalkers ( Avenger ) for (Picked unit)) Greater than 0
        • Then - Actions
          • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
          • Unit - Add AbilityAdd to (Last created unit)
          • Unit - Add AbilityAdd2 to (Last created unit)
          • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
          • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
will do the variable storing.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Here fixed it for you!
Don't take my help for granted, learn from it.

NOTE: The Bloodlust and InnerFire Cooldown must be zero and Casting Range should be very high.
  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • Unit-Type of (Triggering unit) Not Equal to Dummy Spellcaster
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (TempUnit is A structure) Equal to False
              • (Level of Summon Forest Stalkers ( Avenger ) for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for (Triggering Player) at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire (Neutral Hostile) to Dummy
                  • Unit - Add Bloodlust (Neutral Hostile 1) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                  • Else - Actions
                    • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
                    • Unit - Order Dummy to Orc Shaman - Bloodlust (TempUnit
            • Else - Actions
        • Custom script: call RemoveLocation(udg_TempPoint)
If you have any questions on some of the things I do, don't hesitate to ask.
 
Last edited:
Level 9
Joined
Jun 10, 2013
Messages
473
Here fixed it for you!
Don't take my help for granted, learn from it.

NOTE: The Bloodlust and InnerFire Cooldown must be zero and Casting Range should be very high.
  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • Unit-Type of (Triggering unit) Not Equal to Dummy Spellcaster
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set DummyCreated = False
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (TempUnit is A structure) Equal to False
              • (Level of Summon Forest Stalkers ( Avenger ) for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for (Triggering Player) at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire (Neutral Hostile) to Dummy
                  • Unit - Add Bloodlust (Neutral Hostile 1) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                  • Else - Actions
                • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
                • Unit - Order Dummy to Orc Shaman - Bloodlust (TempUnit
            • Else - Actions
    • Custom script: call RemoveLocation(udg_TempPoint)
If you have any questions on some of the things I do, don't hesitate to ask.

THANK YOU SOO MUCH! rest assured I most definitely will learn from this and not at all take your help for granted,
however what variable type is DummyCreated ?
 
Level 9
Joined
Jun 10, 2013
Messages
473
DummyCreated is a boolean, the most pure data of all. (Still requires 4 fcking bytes to store it.)

Thanks the trigger now looks like this

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (TempUnit is A structure) Equal to False
              • (Level of Summon Forest Stalkers ( Avenger ) for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for (Triggering player) at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                • Else - Actions
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
However what were you explaining here Wietol?;

Either remove the expiration timer of the dummy or use a new dummy for each time.
Player owner is not set in this trigger (resulting in a possible incorrect value).
 
Level 9
Joined
Jun 10, 2013
Messages
473
Alright this is the final trigger;

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Set Player_Owner = (Owner of TempUnit)
      • Set TempPoint = (Position of (Triggering unit))
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (TempUnit is A structure) Equal to False
              • (Level of Avenger of the Forests for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for (Triggering player) at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                • Else - Actions
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
However when the hero has the ability even if nearby allied units dies the hero still does not the abilities casted on her by the dummyunit
 
Level 9
Joined
Jun 10, 2013
Messages
473
"Set Player_Owner = (Owner of TempUnit)"
->
"Set Player_Owner = (Owner of (Triggering unit))"

Or better yet, set TempUnit to triggering unit and use tempunit in the location stuff as well.

like this?

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Set Player_Owner = (Owner of (Triggering unit))
      • Set TempPoint = (Position of (Triggering unit))
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Triggering unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (TempUnit is A structure) Equal to False
              • (Level of Avenger of the Forests for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for (Triggering player) at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                • Else - Actions
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 9
Joined
Jun 10, 2013
Messages
473
No not exactly.
You have to use picked unit inside the group loop.
But at the beginning of the trigger, you should set TempUnit = Triggering unit
Then you can use TempUnit in the first two variable setters.

then this?

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set TempPoint = (Position of TempUnit)
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an ally of Player_Owner) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • (Level of Avenger of the Forests for (Picked unit)) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for (Triggering player) at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                • Else - Actions
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
and again thank you two for being so patient :D
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
No, your second one overrides the first, but because you do not need Triggering unit any more after the first two lines, you dont have to care about that it overrides the value.

If you do need them both and thus cannot override any, you have to make multiple variables like TempUnit1, TempUnit2, TemUnit3, but I pretty much dislike that.
Instead of having numberless of those variables, you can make one TempUnit variable and make it an array, then you can use 8191 TempUnitX all at once :D
You just use the index as the number that you place behind all those TempUnits.

When you step up to JASS, you can pretty much use local variables so you wont have problems with different triggers overriding those values or having numberless of those variables at all.
 
Level 9
Joined
Jun 10, 2013
Messages
473
No, your second one overrides the first, but because you do not need Triggering unit any more after the first two lines, you dont have to care about that it overrides the value.

If you do need them both and thus cannot override any, you have to make multiple variables like TempUnit1, TempUnit2, TemUnit3, but I pretty much dislike that.
Instead of having numberless of those variables, you can make one TempUnit variable and make it an array, then you can use 8191 TempUnitX all at once :D
You just use the index as the number that you place behind all those TempUnits.

When you step up to JASS, you can pretty much use local variables so you wont have problems with different triggers overriding those values or having numberless of those variables at all.

well considering the ability still doesn't work I suppose it would mean I need both variables and therefore should set up and array, correct?
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
((Picked unit) is alive) Equal to True
->
(TempUnit is alive) Equal to True

((Picked unit) belongs to an ally of Player_Owner) Equal to True
->
(TempUnit belongs to an ally of Player_Owner) Equal to True

((Picked unit) is A structure) Equal to False
->
(TempUnit is A structure) Equal to False

(Level of Avenger of the Forests for (Picked unit)) Greater than 0
->
(Level of Avenger of the Forests for TempUnit) Greater than 0

Unit - Create 1 Dummy Spellcaster for (Triggering player) at TempPoint facing Default building facing degrees
->
Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees

It should work though.
 
Level 9
Joined
Jun 10, 2013
Messages
473
((Picked unit) is alive) Equal to True
->
(TempUnit is alive) Equal to True

((Picked unit) belongs to an ally of Player_Owner) Equal to True
->
(TempUnit belongs to an ally of Player_Owner) Equal to True

((Picked unit) is A structure) Equal to False
->
(TempUnit is A structure) Equal to False

(Level of Avenger of the Forests for (Picked unit)) Greater than 0
->
(Level of Avenger of the Forests for TempUnit) Greater than 0

Unit - Create 1 Dummy Spellcaster for (Triggering player) at TempPoint facing Default building facing degrees
->
Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees

It should work though.

Still no effect i'm afraid here's the current state of the trigger;

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set TempPoint = (Position of TempUnit)
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (TempUnit is A structure) Equal to False
              • (Level of Avenger of the Forests for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                • Else - Actions
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
would you like a pic of the dummy unit and spells OB data even though i'm pretty sure their correct.
 
Level 9
Joined
Jun 10, 2013
Messages
473
Im pretty sure that is the only thing that can go wrong.
You can try to make a "Game - Display text" stuff to see if the trigger actually runs.

here are the dummy abilities and will make the changes that gusanomental suggested

Screenshot (278).png

Screenshot (279).png

Screenshot (285).png

and the dummy unit

Screenshot (280).png

Screenshot (281).png

Screenshot (282).png

Screenshot (283).png

Screenshot (284).png

///////////////////EDIT////////////////////
gusanomental's suggestion had no effect the ability sadly still does not work.

current state of the trigger;

  • AvengeroftheForests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set TempPoint = (Position of TempUnit)
      • Set DummyCreated = False
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is A structure) Equal to False
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of Player_Owner) Equal to True
              • (Level of Avenger of the Forests ( Avenger ) for TempUnit) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DummyCreated Equal to False
                • Then - Actions
                  • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add a 0.01 second Generic expiration timer to Dummy
                  • Set DummyCreated = True
                • Else - Actions
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Check this. I'm too lazy to make variables and get rid of leaks.

you have to give the dummy unit the two dummy abilities in the object editor to?

and in case wietol has any comments that's gusanomental's trigger of it

  • Detonador sin nombre 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Not equal to dummy
      • ((Dying unit) is A structure) Not equal to True
    • Actions
      • Unit Group - Pick every unit in (Units within 650.00 of (Position of (Dying unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Devotion Aura for (Picked unit)) Greater than 0
              • ((Picked unit) is alive) Equal to True
              • ((Owner of (Picked unit)) is an ally of (Owner of (Dying unit))) Equal to True
            • Then - Actions
              • Unit - Create 1 dummy for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 dummy for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
            • Else - Actions
 
Level 9
Joined
Jun 10, 2013
Messages
473
You can add them to 'empty' dummies via triggers like you triggered before.

Alright so the ability WORKS!!!! at last XD how ever I would like to know how to make it leakless and eerrr stackable :3

and big thanks to all three of you (gusanomental, Wietol and Flux)

  • Avenger of the Forests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Not equal to Dummy Spellcaster
      • ((Dying unit) is A structure) Not equal to True
    • Actions
      • Unit Group - Pick every unit in (Units within 650.00 of (Position of (Dying unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Avenger of the Forests ( Avenger ) for (Picked unit)) Greater than 0
              • ((Picked unit) is alive) Equal to True
              • ((Owner of (Picked unit)) is an ally of (Owner of (Dying unit))) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
              • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Dummy Spellcaster for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
              • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
            • Else - Actions
 
Level 9
Joined
Jun 10, 2013
Messages
473
'Unit Group' and '(Position of (Dying unit))' leak. I suggest you use the variables/custom scripts you had in your old trigger to increase its efficiency.

More about leaks: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/complete-list-things-leak-126761/

So this would be leakless?

  • Avenger of the Forests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Not equal to Dummy Spellcaster
      • ((Dying unit) is A structure) Not equal to True
    • Actions
      • Set TempUnit = (Dying unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Avenger of the Forests ( Avenger ) for (Picked unit)) Greater than 0
              • ((Picked unit) is alive) Equal to True
              • ((Owner of (Picked unit)) is an ally of Player_Owner) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
and is there any way to make this stack with as many units that sie within a minute around the hero for example if 10 units die around her within 60 seconds she'll get the bonuses and their durations times 10
 
Last edited:
Level 9
Joined
Jun 10, 2013
Messages
473
My bad, forgot to include Player_Owner variable in the trigger I wrote. So where's the final trigger? let me find something I can nitpick.

heres the final trigger, and is there any way to make this stack with as many units that die within a minute around the hero for example if 10 units die around her within 60 seconds she'll get the bonuses and their durations times 10

  • Avenger of the Forests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Not equal to Dummy Spellcaster
      • ((Dying unit) is A structure) Not equal to True
    • Actions
      • Set TempUnit = (Dying unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire ( damage increase for AvengeroftheForests )
      • Set AbilityAdd2 = Bloodlust ( attack speed increase for AvengeroftheForests )
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Avenger of the Forests ( Avenger ) for (Picked unit)) Greater than 0
              • ((Picked unit) is alive) Equal to True
              • ((Owner of (Picked unit)) is an ally of Player_Owner) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd2 to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Look at the Test Map here!
I tested it myself, it is fully working.
You may get a lag spike the first time due to the abilities not preloaded.

In the Test Map, I used Devotion Aura instead of Avenger something..

Creating Units are costly and create a permanent 0.04 kb memory leak hence it's best to avoid it whenever possible.
This trigger only creates 1 unit per death NOT 1 unit per target (which your previous trigger do)
So if a unit dies and there are 5 units with the Avenger Ability, it will only create 1 dummy unit unlike your previous trigger which would have created 5 dummy units.


  • Avenger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy SpellCaster
    • Actions
      • Game - Display to (All players) the text: A Unit Dies
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempOwner = (Triggering player)
      • Set CreateDummy = True
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempLoc) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of TempOwner) Equal to True
              • (Level of Devotion Aura for TempUnit) Greater than 0
            • Then - Actions
              • Game - Display to (All players) the text: ((Name of TempUnit) + have the ability)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CreateDummy Equal to True
                • Then - Actions
                  • Set CreateDummy = False
                  • Game - Display to (All players) the text: Dummy Unit Created
                  • Unit - Create 1 Dummy SpellCaster for TempOwner at TempLoc facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add a 0.20 second Generic expiration timer to Dummy
                  • Unit - Add Bloodlust (Avenger) to Dummy
                  • Unit - Add Inner Fire (Avenger) to Dummy
                • Else - Actions
              • Set TempLoc2 = (Position of TempUnit)
              • Unit - Move Dummy instantly to TempLoc2
              • Custom script: call RemoveLocation(udg_TempLoc2)
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
              • Game - Display to (All players) the text: (Ordered the Dummy to Cast Bloodlust and InnerFire on + (Name of TempUnit))
            • Else - Actions
              • Game - Display to (All players) the text: ((Name of TempUnit) + doesn't have the ability)
      • Custom script: call RemoveLocation(udg_TempLoc)
 

Attachments

  • GandalfTheWhite.w3x
    18.4 KB · Views: 36
Level 9
Joined
Jun 10, 2013
Messages
473
Look at the Test Map here!
I tested it myself, it is fully working.
You may get a lag spike the first time due to the abilities not preloaded.

In the Test Map, I used Devotion Aura instead of Avenger something..

Creating Units are costly and create a permanent 0.04 kb memory leak hence it's best to avoid it whenever possible.
This trigger only creates 1 unit per death NOT 1 unit per target (which your previous trigger do)
So if a unit dies and there are 5 units with the Avenger Ability, it will only create 1 dummy unit unlike your previous trigger which would have created 5 dummy units.


  • Avenger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy SpellCaster
    • Actions
      • Game - Display to (All players) the text: A Unit Dies
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempOwner = (Triggering player)
      • Set CreateDummy = True
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempLoc) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of TempOwner) Equal to True
              • (Level of Devotion Aura for TempUnit) Greater than 0
            • Then - Actions
              • Game - Display to (All players) the text: ((Name of TempUnit) + have the ability)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CreateDummy Equal to True
                • Then - Actions
                  • Set CreateDummy = False
                  • Game - Display to (All players) the text: Dummy Unit Created
                  • Unit - Create 1 Dummy SpellCaster for TempOwner at TempLoc facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add a 0.20 second Generic expiration timer to Dummy
                  • Unit - Add Bloodlust (Avenger) to Dummy
                  • Unit - Add Inner Fire (Avenger) to Dummy
                • Else - Actions
              • Set TempLoc2 = (Position of TempUnit)
              • Unit - Move Dummy instantly to TempLoc2
              • Custom script: call RemoveLocation(udg_TempLoc2)
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
              • Game - Display to (All players) the text: (Ordered the Dummy to Cast Bloodlust and InnerFire on + (Name of TempUnit))
            • Else - Actions
              • Game - Display to (All players) the text: ((Name of TempUnit) + doesn't have the ability)
      • Custom script: call RemoveLocation(udg_TempLoc)

This can't possibly be both leakless and stackable! otherwise I think you should take a job up at the make a wish foundation

EDIT: referring to the test map and thanks a billion of course
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
This can't possibly be both leakless and stackable!
I dunno bout Shadow Flux, but there is almost no limitations to the extends of my power inside Warcraft 3!

If I wanted this and make it stack, then Id use a custom stat system and buff system to actually do everything inside the code.
I would also make an Invisibility library to make everything much easier.
But it all be in JASS, so you are pretty fcked up.

It currently just resets the duration and doesnt stack in strength.
It is fine in a logical sense... but yea, it would be fun to have something more powerfull :/
 
Level 9
Joined
Jun 10, 2013
Messages
473
All right due to a misunderstanding with flux (an honest mistake nothing serious) the trigger is now this since its the only one I've used which worked therefore my question now is:

1) is this leakless

and

2) How do I make the effects of the dummy abilities stackable per killed allied unit

and in case the idea of the ability was lost in all this:

its a hero ability which means only the hero has the avenger ability and when the hero gets that ability it makes it so that when ever an allied unit around the hero dies the hero gets the buffs (which I eventually plan to make stackable per number of killed allies)

  • Avenger of the Forests
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Not equal to Dummy Spellcaster
      • ((Dying unit) is A structure) Not equal to True
    • Actions
      • Set TempUnit = (Dying unit)
      • Set TempPoint = (Position of TempUnit)
      • Set Player_Owner = (Owner of TempUnit)
      • Set AbilityAdd = Inner Fire ( damage increase for AvengeroftheForests )
      • Set AbilityAdd2 = Bloodlust ( attack speed increase for AvengeroftheForests )
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempPoint) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Avenger of the Forests ( Avenger ) for (Picked unit)) Greater than 0
              • ((Picked unit) is alive) Equal to True
              • ((Owner of (Picked unit)) is an ally of Player_Owner) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd to (Last created unit)
              • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Dummy Spellcaster for Player_Owner at TempPoint facing Default building facing degrees
              • Unit - Add AbilityAdd2 to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Last edited:
Level 9
Joined
Jun 10, 2013
Messages
473
Then you could try changing buffs duration to 0 in obj editor and every time the skill is triggered an int variable increases +1 and starts a Timer that every time it reaches 0 it sets the int variable = current value - 1... If value 0 = remove both buffs.

um... that sounds good how ever i'm not sure exactly how to do that (I read some where you have to make multiple levels and buffs for the dummy ability how ever your way sounds easier)
 
Status
Not open for further replies.
Top