Leazy
You can change this now in User CP.
- Reaction score
- 50
Hello!
I made a simple knock back system:
The problem is that units slide against walls and other obstacles when being knocked back, how can I prevent this? I want that they should either stop being knocked back when reaching an obstacle, or just keep being knocked against it. Is this possible?
I made a simple knock back system:
Trigger:
- Knockback
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in Knockback_Group and do (Actions)
- Loop - Actions
- Set Caster = (Picked unit)
- Set Point[1] = (Position of Caster)
- Set Point[2] = (Point[1] offset by KNOCKBACK_Power[(Custom value of Caster)] towards KNOCKBACK_Angle[(Custom value of Caster)] degrees)
- Unit - Move Caster instantly to Point[2]
- Special Effect - Create a special effect attached to the origin of Caster using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Set KNOCKBACK_Duration[(Custom value of Caster)] = (KNOCKBACK_Duration[(Custom value of Caster)] - 0.03)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- KNOCKBACK_Duration[(Custom value of Caster)] Less than or equal to 0.00
- Then - Actions
- Unit Group - Remove Caster from Knockback_Group
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation (udg_Point[1])
- Custom script: call RemoveLocation (udg_Point[2])
- Loop - Actions
- Unit Group - Pick every unit in Knockback_Group and do (Actions)
- Events
The problem is that units slide against walls and other obstacles when being knocked back, how can I prevent this? I want that they should either stop being knocked back when reaching an obstacle, or just keep being knocked against it. Is this possible?