Leazy
You can change this now in User CP.
- Reaction score
- 50
Hello! I'm making a attack system like in Diablo where you can dodge arrows etc by moving. This is what I got so far:
Problem is that unless I change ownership to attacking unit into something that won't attack anyone the unit will fire very rapidly due to attack being interrupted. Is there any way to solve this without changing ownership? I need some way of delaying the next attack (not pause/stun)
Trigger:
- Untitled Trigger 001
- Events
- Unit - A unit Is attacked
- Conditions
- Actions
- Custom script: local unit Attacker = GetAttacker()
- Unit - Order (Attacking unit) to Stop
- Animation - Play (Attacking unit)'s attack animation
- Animation - Queue (Attacking unit)'s stand animation
- Unit - Change ownership of (Attacking unit) to Neutral Passive and Retain color
- Wait 0.72 seconds
- Custom script: set udg_Caster = Attacker
- Set Point[1] = (Position of (Attacking unit))
- Set Point[2] = (Position of (Attacked unit))
- Set Point[3] = (Point[1] offset by 50.00 towards (Angle from Point[1] to Point[2]) degrees)
- Unit - Create 1 Missile: Shoot for (Owner of (Attacking unit)) at Point[3] facing (Angle from Point[1] to Point[2]) degrees
- Wait 0.28 seconds
- Custom script: set udg_Caster = Attacker
- Unit - Change ownership of Caster to Player 2 (Blue) and Retain color
- Events
Problem is that unless I change ownership to attacking unit into something that won't attack anyone the unit will fire very rapidly due to attack being interrupted. Is there any way to solve this without changing ownership? I need some way of delaying the next attack (not pause/stun)