-
Couldn't load subscription status.
- Fork 6
WCSharp.Knockbacks
Orden4 edited this page Apr 1, 2021
·
2 revisions
The knockback system provides the following features:
- Supports any number of knockbacks, potentially multiple on the same unit
- Customise the distance and duration of knockbacks
- Via "reversing the arguments", can also be used to pull enemies towards a location
Performing a knockback on a unit is simple, all you need to do is create a new Knockback object using one of the two constructors, which specify either an angle or a position to fly towards, and add it to the system using KnockbackSystem.Add(<knockback>);. Each constructor also allows you to set the distance and duration of the knockback.
To calculate the angle of the knockback, you can use the AngleBetweenPoints methods located in WCSharp.Utils.
| Name | Description |
|---|---|
| Active | Inherited from IPeriodicAction. Set to false to disable and remove. |
| Target | The target of the knockback. |
| Angle | The angle of the knockback in degrees. |
| Speed | The distance traversed per tick (0.03125). |
| SpeedDropoff | The amount of speed lost per tick (0.03125). |
| Effect1 | This effect will be spawned every 1.0 seconds on the target using Effect1AttachmentPoint. |
| Effect2 | This effect will be spawned every 0.125 seconds on the target using Effect2AttachmentPoint. |
| Effect1AttachmentPoint | The attachment point to use for Effect1. |
| Effect2AttachmentPoint | The attachment point to use for Effect2. |
- Home
- WCSharp template
- Release notes
- Desyncs
- Upgrading to War3Net v5.x
- WCSharp.Api
- WCSharp.Buffs
- WCSharp.ConstantGenerator
- WCSharp.DateTime
- WCSharp.Dummies
- WCSharp.Effects
- WCSharp.Events
- WCSharp.JsonConvert
- WCSharp.Knockbacks
- WCSharp.Lightnings
- WCSharp.Missiles
- WCSharp.SaveLoad v1.x
- WCSharp.SaveLoad v2.x
- WCSharp.Shared
- WCSharp.Sync
- WCSharp.W3MMD