Passive Ability not working for allies

ludnica

Long gone
Reaction score
61
Explanation on the ability:
A passive ability, that activates when I'm attacking a unit (if you've played DotA - looks like Abaddon's Frostmourne), increasing my attack and movement speed. When an ally starts attacking the same unit, it should benefit from my ability...but hell, it doesn't.

Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • (((Attacked unit) is A structure) Equal to False) and (((Attacked unit) has buff OmnipotenceDebuff) Equal to True)
      • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
    • Actions
      • Set OmnipotenceDebuff = Omnipotence (Stacking)
      • Set OmnipotenceLevel = (Level of Omnipotence for (Triggering unit))
      • Set LocationPositionUnit = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at LocationPositionUnit facing Default building facing degrees
      • Set LastCreatedDummy = (Last created unit)
      • Unit - Add Omnipotence Buff to LastCreatedDummy
      • Unit - Set level of Omnipotence Buff for LastCreatedDummy to (Level of Omnipotence for (Attacking unit))
      • Unit - Add a 1.00 second Water Elemental expiration timer to LastCreatedDummy
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Omnipotence for (Attacking unit)) Greater than 0
        • Then - Actions
          • Unit - Order LastCreatedDummy to Orc Shaman - Bloodlust (Attacking unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_LocationPositionUnit)

It still bothers me how this fails to "buff" nearby allies, that are attacking my target. What should I do to make them benefit from it? Oh, and, if any major mistakes/flaws are made, I'd like to know.
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
Where does it actually give the attacked unit that debuff? :)
 

ludnica

Long gone
Reaction score
61
Uh, it's based on Poison Sting. You know the ability. Attacked unit is poisoned for <seconds>.
 

ludnica

Long gone
Reaction score
61
Ah, I forgot something.
Trigger:
  • Set OmnipotenceDebuff = Omnipotence (Stacking)

That line is at map initialization, not in the trigger. And that's just a buff type. The attacking unit has the ability that adds the debuff on the attacked unit. It lasts for 2 seconds - long enough for the attacker to make an another attack (Poison Sting based).
 

vypur85

Hibernate
Reaction score
803
> (Level of Omnipotence for (Attacking unit)) Greater than 0
> Unit - Set level of Omnipotence Buff for LastCreatedDummy to (Level of Omnipotence for (Attacking unit))

Generally, only the hero with Omnipotence will get Bloodlusted. Other units (allies) wouldn't have had the Omnipotence ability right? And so, the condition will always return false.
 

ludnica

Long gone
Reaction score
61
So I have to get rid of those and my allies will benefit from it? Or there's something else, unknown to me...
 

vypur85

Hibernate
Reaction score
803
Code:
    Events
        Unit - A unit Is attacked
    Conditions
        (((Attacked unit) is A structure) Equal to False) and (((Attacked unit) has buff OmnipotenceDebuff) Equal to True)
        ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
    Actions
        [del]Set OmnipotenceDebuff = Omnipotence (Stacking)[/del] <-- [I]Should be in Map Init, as you said[/I]
        [del]Set OmnipotenceLevel = (Level of Omnipotence  for (Triggering unit))[/del]
        Set LocationPositionUnit = (Position of (Triggering unit))
        Unit - Create 1 Dummy for (Owner of (Attacking unit)) at LocationPositionUnit facing Default building facing degrees
        Unit - Add Omnipotence Buff  to (Last created unit)
        [del]Unit - Set level of Omnipotence Buff  for LastCreatedDummy to (Level of Omnipotence  for (Attacking unit))[/del]
        Unit - Add a 1.00 second Water Elemental expiration timer to LastCreatedDummy
        Unit - Order LastCreatedDummy to Orc Shaman - Bloodlust (Attacking unit)
        Custom script:   call RemoveLocation(udg_LocationPositionUnit)

Well, you can start off by trying the above code. Since you're not able to detect the level of buff, the ability is currently only possible for level 1. To be able to level it correctly, you may need separate buff type per level for the Poison Sting ability, so that they can be differentiated at different level.
 

Admit

New Member
Reaction score
25
Can you post the spell? (The spell your using in Object Editor) I tried i created my own version of it and it worked.
Edit* You don't need to check the level of the ability. It runs for every level.

Also im new to this forum, so if anyone could tell me how to post the triggers in code so i can post it here.
 

ludnica

Long gone
Reaction score
61
Now it works fine. Thanks for the time taken.

/off
Press the "a" tag - WC3 GUI tags when posting a reply (not a quick one).
 

Admit

New Member
Reaction score
25
Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • ((Attacked unit) is A structure Equal to False
        • ((Attacked unit) has buff Omnipotence (Stacking)) Equal to True
        • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
    • Actions
      • If ((Level of Omnipotence for (Attacking unit)) Greater than 0) then do (Unit - Set the custom value of (attacked unit) to (Level of Omnipotence for (Attacking unit))) else do (Do nothing)
      • Set OmnipotenceLevel = (Custom value of Attacked unit))))
      • Set LocationPositionUnit = (Position of (Attacking unit))
      • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at LocationPositionUnit facing (Position of (Attacking unit))
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add OmnipotenceBuff to (Last created unit)
      • Unit - Set level of OmnipotenceBuff for (Last created unit) to OmnipotenceLevel
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (attacking unit)
      • Custom script: call RemoveLocation(udg_LocationPositionUnit)


Spell: Omnipotence (Based of Slow poison), needs the buffs "Omnipotence (Stacking)" And "Omnipotence (Non-Stacking)"
Or else the buffs will be "Slow poison" (not "Omnipotence (Non-Stacking)")

Edit* Ah, now i saw what "vypur85" ment, this will only give the friendly units level 1 not level 2 and 3. But it will still work.
Edit2* Added so the spell worked for all levels for allied units (it will now give level 2 buff for level 2 spell).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top