[Spell] Chance to slow the enemy on attack

Level 13
Joined
Sep 11, 2013
Messages
467
Greetings!
I want to create a passive ability just lvl 1 that has 75% chance on each attack to slow the enemy movement speed by 35%(non-stacking) for 0.5 seconds.
After few attepts, I managed to do something but is bugged and with problems and I need your help. :peasant-sad:
So here is what I did:

  • Attack Slow Chance
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Rifleman
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Game - Display to (All players) the text: asdasdasdf
      • Set VariableSet AttackSlowPoint = (Position of (Damage source))
      • Unit - Create 1 Wisp Attack Slow Dummy for (Owner of (Damage source)) at AttackSlowPoint facing (Position of (Damage Target))
      • Set VariableSet AttackSlowDummy = (Last created unit)
      • Unit - Add a 0.30 second Generic expiration timer to AttackSlowDummy
      • Unit - Add Slow Poison GOOD to AttackSlowDummy
      • Unit - Order AttackSlowDummy to Attack Once (Damage Target)
      • Custom script: call RemoveLocation(udg_AttackSlowPoint)
  • Untitled Trigger 002
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Wisp Attack Slow Dummy
    • Actions
      • Game - Display to (All players) the text: zz
      • Unit - Kill (Damage source)
The second trigger run 2 times on each hit and I don't know why..
And the first trigger will hit the target with a 0.1 sec delay and I can saw how my unit is hitted twice instead of once. Once by Rifleman and once by dummy..
I wish to slow the enemy with 1 visual hit per hit not with 2 visual hits per hit. (if that makes sense):peasant-confused:

Maybe there is a better way to make this passive, but i need your help to find that!:peasant-thinking:

I'll attach my map with the problem here.

The help will be appreciated!
 

Attachments

  • Chance to slow the enemy on attack.w3m
    19.2 KB · Views: 8

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
The question is, do you really need to rely on a Dummy unit to apply Slow Poison? There's all sorts of complications that come with a "dummy attack".

Couldn't you just have it cast Acid Bomb, or Slow, or any of the other abilities that Slow + potentially deal damage over time.

But if you NEED to rely on Slow Poison then you could probably do this:
  • Attack Slow Chance
    • Events
      • Unit - A unit About to take damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Rifleman
      • (Damage From Normal Attack) Equal to True
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Custom script: local unit udg_Rifleman = GetEventDamageSource()
      • Unit - Add Slow Poison (Rifleman) to Rifleman
      • Wait 0.01 game-time seconds
      • Unit - Remove Slow Poison (Rifleman) from Rifleman
Not sure though... The Event may occur after the buff application.

Edit:
Check if it's an attack. You wouldn't want some damaging Rifleman ability to trigger the Slow Poison:
  • (Damage From Normal Attack) Equal to True
 
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
467
The question is, do you really need to rely on a Dummy unit to apply Slow Poison? There's all sorts of complications that come with a "dummy attack".

Couldn't you just have it cast Acid Bomb, or Slow, or any of the other abilities that Slow + potentially deal damage over time.
God i am so noob! You're right, the slow ability is the solution for my problem. I totally forgot about that obvious ability. Thank you for the help!
I'll use the dummy as you told me few threads ago.:peasant-smile:

  • Attack Slow Chance
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Rifleman
      • (Damage From Normal Attack) Equal to True
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Set VariableSet AttackSlowPoint = (Position of (Damage source))
      • Unit - Create 1 Wisp Attack Slow Dummy for (Owner of (Damage source)) at AttackSlowPoint facing (Position of (Damage Target))
      • Set VariableSet AttackSlowDummy = (Last created unit)
      • Unit - Add a 0.30 second Generic expiration timer to AttackSlowDummy
      • Unit - Add Slow X to AttackSlowDummy
      • Unit - Grant shared vision of (Damage Target) to (Owner of (Damage source))
      • Unit - Order AttackSlowDummy to Human Sorceress - Slow (Damage Target)
      • Unit - Deny shared vision of (Damage Target) to (Owner of (Damage source))
      • Custom script: call RemoveLocation(udg_AttackSlowPoint)
 
Top