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

[Solved] Envenomed Net

Status
Not open for further replies.
Level 24
Joined
May 15, 2013
Messages
3,782
Guy's and Gal's,

I was making an Envenomed Net base on Ensnare.

  • Envenomed Net
    • Event - A unit cast an ability
    • Condition - [Ability being cast] Equal to Envenomed Net
    • Action
      • Unit - Create 1 EN Dummy at Position of [Targeted Unit of Ability Being Cast]
      • Unit - Create a Generic expiration timer for [Last created unit]
      • Unit - Order [Last created unit] to attack [Targeted Unit of ability Being Cast]
      • If Conditions
        • Or - Any Conditions are True
          • [Target Unit of ability being cast] has Envenomed Net (Buff) Equal to False
          • [Target Unit of ability being cast] is dead Equal to True
      • Then Actions
        • Unit - Remove [Last created unit] from game
        • Unit - Remove Venom (Dummy Buff) from [Target unit of ability being cast]
        • Else Actions
          • Do Nothing
I added an Envenomed Spears with the Venom Buff to the dummy who attack, It doesn't work. Its just regular Ensnare with no poison dps
Need help.
 
Level 4
Joined
Aug 7, 2010
Messages
77
Hello there, i don't think the "targeted unit" works in this case. Currently i'm also facing this problem to check how to use the targeted unit in triggers.

What i would do is to check if there's a venom buff exist in the map. if so, add ur dummy unit to the position of the enemy to attack it(?)

  • Venon Buff unit check
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Venom buff) Equal to True
            • Then - Actions
              • Unit - Create 1 EN Dummy at Position of [Picked Unit]
              • Unit - Create a Generic expiration timer for [Last created unit]
              • Unit - Order [Last created unit] to attack [Picked Unit]
            • Else - Actions
              • Do Nothing
No idea if it works. Just offering my suggestion.
 
Level 4
Joined
Aug 7, 2010
Messages
77
Sorry i was lazy

  • Venon Buff unit check
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set UnitsOnMap = (Units in (Playable map area))
      • Unit Group - Pick every unit in UnitsOnMap and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Venom buff) Equal to True
            • Then - Actions
              • Unit - Create 1 EN Dummy at Position of [Picked Unit]
              • Unit - Create a Generic expiration timer for [Last created unit]
              • Unit - Order [Last created unit] to attack [Picked Unit]
            • Else - Actions
              • Do Nothing
        • Custom script: call DestroyGroup (udg_UnitsOnMap)
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
Your trigger is fine with just the expiration timer. The reason it's failing is because your unit is being removed instantly. When the ability is cast, it doesn't apply the net buff immediately, thus the condition for the unit not having the buff will succeed and the unit will be removed before it even attacks. It also doesn't remove the ensnare buff, because again it hasn't been applied yet.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Also, please get rid of the "Do nothing" action and leave the "Else" block empty. It will do the same as with "Do nothing" but is more effective.
For any future triggers, do not use the "Do nothing" action at all (unless it is the "If/Then/Else" for single actions, which force you to put something in each field)
 
Sorry i was lazy

  • Venon Buff unit check
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set UnitsOnMap = (Units in (Playable map area))
      • Unit Group - Pick every unit in UnitsOnMap and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Envenom Net [buff]) Equal to True
              • ((Picked unit) has buff Venom buff) Equal to False
            • Then - Actions
              • Unit - Create 1 EN Dummy at Position of [Picked Unit]
              • Unit - Create a Generic expiration timer for [Last created unit]
              • Unit - Order [Last created unit] to attack [Picked Unit]
            • Else - Actions
              • Do Nothing
        • Custom script: call DestroyGroup (udg_UnitsOnMap)

this trigger will create a huge lag when there's an ensnared unit...also leaks the point where the unit is created.. make sure you create a variable for the point and destroy it after using.

  • Venom Buff unit check
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set UnitsOnMap = (Units in (Playable map area))
      • Unit Group - Pick every unit in UnitsOnMap and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Venom buff) Equal to True
            • Then - Actions
              • Set Dummy_Point = (Position of (Picked unit))
              • Unit - Create 1 EN Dummy at Dummy_Point
              • Unit - Create a Generic expiration timer for [Last created unit]
              • Unit - Order [Last created unit] to attack [Picked Unit]
              • Custom script: call RemoveLocation (udg_Dummy_Point)
            • Else - Actions
        • Custom script: call DestroyGroup (udg_UnitsOnMap)
 
^That is not very efficient either. One could add all units taht the spell is cast on into a unit group, and check units in that group.

When a unti casts a spell on target, then target might not have the buff instantly. A 0.00 timer might be needed before the "unit has buff" check is true.

I know it's not efficient... I'm just showing him the point leaks.. As I was saying this trigger will sure lag because u create 1 unit for every 0.02 seconds if a unit has that buff...
 
Level 11
Joined
Nov 15, 2007
Messages
800
I decided this is simpler to make than to explain.

Tip: Create the attacking unit on the caster instead of the target, and give it a ranged attack with .01 damage point and an invisible missile with a speed identical to the speed of the net and the poison will be applied at about the same instant as the net hits.
 

Attachments

  • venomous ensnare.w3x
    17.5 KB · Views: 39
Status
Not open for further replies.
Top