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

[Spell] Envenomed Spears with procentual chance to proc.

Level 13
Joined
Sep 11, 2013
Messages
484
Greetings!

I tried to create a passive spell (just level 1) that has 75% chance on each attack to proc Envenomed Spears on enemy units in order to poison them with damage over time and with slow movement speed over time.

I had 2 ideas, but non of them work as I wanted..:peasant-work-work:
  • All Critical Strike Strygwyr
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Strygwyr X
      • (Damage From Normal Attack) Equal to True
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Set VariableSet AttackSlowPointStryg = (Position of (Damage source))
      • Unit - Create 1 Wisp Attack Slow Stryg Dummy for (Owner of (Damage source)) at AttackSlowPointStryg facing (Position of (Damage Target))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Envenomed Spears X to (Last created unit)
      • Unit - Order (Last created unit) to Attack Once (Damage Target)
      • Custom script: call RemoveLocation(udg_AttackSlowPointStryg)
+
  • Untitled Trigger 002
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Wisp Attack Slow Stryg Dummy
    • Actions
      • Event Response - Set Damage of Unit Damaged Event to 0.00
      • Unit - Remove (Damage source) from the game

I set dummy unit every animation to 0 seconds, but IDK why.. the dummy unit attack with delay approx 0.35 seconds. Weapon type is set to instant.
That ~ 0.35 sec delay is the problem and I don't know how to fix that.

Here I tried a new strategy, but did not work and idk why. (nothing happen)

  • Try 2
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Strygwyr X
      • (Damage From Normal Attack) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 75
        • Then - Actions
          • Game - Display to (All players) the text: enabled
          • Unit - For (Damage source), Ability Envenomed Spears X , Disable ability: False, Hide UI: False
        • Else - Actions
          • Unit - For (Damage source), Ability Envenomed Spears X , Disable ability: True, Hide UI: True
          • Game - Display to (All players) the text: disabled
Maybe someone know how to solve this problem. :peasant-thinking:

The help will be appreciated!:peasant-bowing:
 

Attachments

  • Stryg Passive.w3m
    22.2 KB · Views: 7
Level 31
Joined
Aug 29, 2012
Messages
1,431
Try setting the attack type to normal of even missile, Envenomed spears might be one of those abilities that need a certain type to work

I doubt a 0.35 delay is causing everything to fail because the dummy has 2 seconds to do its job which should be plenty of time. Also if you have based the unit on the wisp, make sure it has one attack enabled and that the dice values are correct
Tip: this makes an unit do 0-0 damage but still creates a normal attack and applies on-hit effects

1748917117388.png
 
Level 24
Joined
Feb 27, 2019
Messages
841
Greetings!

I tried to create a passive spell (just level 1) that has 75% chance on each attack to proc Envenomed Spears on enemy units in order to poison them with damage over time and with slow movement speed over time.

I had 2 ideas, but non of them work as I wanted..:peasant-work-work:
  • All Critical Strike Strygwyr
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Strygwyr X
      • (Damage From Normal Attack) Equal to True
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Set VariableSet AttackSlowPointStryg = (Position of (Damage source))
      • Unit - Create 1 Wisp Attack Slow Stryg Dummy for (Owner of (Damage source)) at AttackSlowPointStryg facing (Position of (Damage Target))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Envenomed Spears X to (Last created unit)
      • Unit - Order (Last created unit) to Attack Once (Damage Target)
      • Custom script: call RemoveLocation(udg_AttackSlowPointStryg)
+
  • Untitled Trigger 002
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Wisp Attack Slow Stryg Dummy
    • Actions
      • Event Response - Set Damage of Unit Damaged Event to 0.00
      • Unit - Remove (Damage source) from the game

I set dummy unit every animation to 0 seconds, but IDK why.. the dummy unit attack with delay approx 0.35 seconds. Weapon type is set to instant.
That ~ 0.35 sec delay is the problem and I don't know how to fix that.

Here I tried a new strategy, but did not work and idk why. (nothing happen)

  • Try 2
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Strygwyr X
      • (Damage From Normal Attack) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 75
        • Then - Actions
          • Game - Display to (All players) the text: enabled
          • Unit - For (Damage source), Ability Envenomed Spears X , Disable ability: False, Hide UI: False
        • Else - Actions
          • Unit - For (Damage source), Ability Envenomed Spears X , Disable ability: True, Hide UI: True
          • Game - Display to (All players) the text: disabled
Maybe someone know how to solve this problem. :peasant-thinking:

The help will be appreciated!:peasant-bowing:
The second idea but use the event a unit is attacked instead.

Enable/disable ability works on a counter. If it's enabled 5 times it must be disabled 6 times to become disabled. 6 times because 5 times would return the count to normal and 1 more time to disable the ability
 
Level 13
Joined
Sep 11, 2013
Messages
484
Try setting the attack type to normal of even missile, Envenomed spears might be one of those abilities that need a certain type to work

I doubt a 0.35 delay is causing everything to fail because the dummy has 2 seconds to do its job which should be plenty of time. Also if you have based the unit on the wisp, make sure it has one attack enabled and that the dice values are correct
Tip: this makes an unit do 0-0 damage but still creates a normal attack and applies on-hit effects
In the first example the envenomed speers both effects works fine with instant attack, but it applies with that ~0.35 sec delay.
Thanks for the Tip!

In the 2nd example of mine, that trigger will never disable the envenomed speers. Idk why.
Why not just using dummy to cast Acid Bomb instead? attacking dummy is fine but it bugged me when it deal 1 damage althrough it can be manipulated with damage engine.
That Acid bomb(but is aoe) combined with instant slow may work. I will try that soon with aoe set to 0 maybe. Thank you!
We also have some Damage Over Time system in the Spells & Systems section
You can combine these with a negative aura such as tornado slow to show the buff status and allow it to be undispellable.
Just an alternative that might be worth to consider.
Thank you for advice, but it seems way to complicated for what i need.:)

The second idea but use the event a unit is attacked instead.

Enable/disable ability works on a counter. If it's enabled 5 times it must be disabled 6 times to become disabled. 6 times because 5 times would return the count to normal and 1 more time to disable the ability
That didn't work either. same problem. The spell will not be disabled and idk why.. Thank you for help!
 
Last edited:
Level 24
Joined
Feb 27, 2019
Messages
841
That didn't work either. same problem. The spell will not be disabled and idk why.. Thank you for help!
You are not understanding how disable/enable ability for unit functions, its not an on/off switch. The ability is disabled if the counter is greater than 0. If the counter is less than or equal to 0 its enabled. In your trigger theres a 75% chance that the counter goes -1 when the ability is enabled and a 25% chance the counter goes +1 when the ability is disabled. Statistically the counter will go -1 more times than +1 so its unlikely to ever go above 0 and be be disabled. If the disable/enable ability for unit is used sporadically it requires additional logic to keep track of the counter with an integer or boolean to make sure it remains stable.

Example:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Wind Rider
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 75
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Disabled Equal to True
            • Then - Actions
              • Set VariableSet Disabled = False
              • Unit - For (Attacking unit), Ability Envenomed Spears, Disable ability: False, Hide UI: False
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Disabled Equal to False
            • Then - Actions
              • Set VariableSet Disabled = True
              • Unit - For (Attacking unit), Ability Envenomed Spears, Disable ability: True, Hide UI: True
            • Else - Actions
This makes sure the counter only goes +1 when the boolean Disabled = false and -1 when the boolean Disabled = true. Keeping the counter being either 0 or 1.
 
Level 13
Joined
Sep 11, 2013
Messages
484
You are not understanding how disable/enable ability for unit functions, its not an on/off switch. The ability is disabled if the counter is greater than 0. If the counter is less than or equal to 0 its enabled. In your trigger theres a 75% chance that the counter goes -1 when the ability is enabled and a 25% chance the counter goes +1 when the ability is disabled. Statistically the counter will go -1 more times than +1 so its unlikely to ever go above 0 and be be disabled. If the disable/enable ability for unit is used sporadically it requires additional logic to keep track of the counter with an integer or boolean to make sure it remains stable.

Example:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Wind Rider
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 75
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Disabled Equal to True
            • Then - Actions
              • Set VariableSet Disabled = False
              • Unit - For (Attacking unit), Ability Envenomed Spears, Disable ability: False, Hide UI: False
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Disabled Equal to False
            • Then - Actions
              • Set VariableSet Disabled = True
              • Unit - For (Attacking unit), Ability Envenomed Spears, Disable ability: True, Hide UI: True
            • Else - Actions
This makes sure the counter only goes +1 when the boolean Disabled = false and -1 when the boolean Disabled = true. Keeping the counter being either 0 or 1.
Thank you for your explanation and for your help. I didn't know anything about that counter or how to use that trigger.. :peasant-sad:
Your trigger seems to work for 1 unit, but if 2 or more units with the same passive attack other units, this trigger seems to work only on first unit that attack.

Is there a way to make this passive independent like critical strike for each unit?

Edit: This trigger seems to work. What do you think? It can create problems in a long run?

  • Untitled Trigger 003
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Strygwyr X
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 50
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Unit - Add Envenomed Spears X to (Attacking unit)
              • Game - Display to (All players) the text: Enabled
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Unit - Remove Envenomed Spears X from (Attacking unit)
              • Game - Display to (All players) the text: Disabled
            • Else - Actions
 

Attachments

  • Stryg Passive V2.w3m
    22.4 KB · Views: 0
Last edited:
Level 31
Joined
Aug 29, 2012
Messages
1,431
By the way did you try your first idea but creating the dummy at the position of the damaged unit, not the damage source? Also, does your dummy have a 0.00 damage point? Otherwise the delay might come from there

It still feels easier and more failproof than disabling/enabling abilities constantly
 
Level 13
Joined
Sep 11, 2013
Messages
484
By the way did you try your first idea but creating the dummy at the position of the damaged unit, not the damage source? Also, does your dummy have a 0.00 damage point? Otherwise the delay might come from there

It still feels easier and more failproof than disabling/enabling abilities constantly
Yes, I tried with damage target position and also damage point was always 0.00 and that delay is still there. I put an Edit above this post with my latest trigger update that seems to work. The alternative It feels easier, but didn't work..
 
Top