The game provides some simple high level API for creating attacks. You're also free to create your attacks.
Attacks that instantly apply damage. You can find some useful functions inside
fire_ray- A "hitscan" raycast that damages
fire_bullet- Builds on top of
fire_rayand adds some effects like impact puff & sparks, bullet hole, and blood splats.
damage_sight_sphere_linear- Damage Damageables inside the sphere which have line of sight to the center of it, by an amount linearly relative to their distance from the sphere's center, and creates some effects.
The game provides a projectile design in which the projectile class triggers a callbacks. This decoupling allows the users of the class to do different things upon triggering without having to create new projectile class for each case.
New projectiles should derive from the base class
Projectile which is defined in
Projecile classes should only define when the projectile is triggered, not what happens when it's triggered.
Projectiles are "triggered" by calling the function
Projectile::trigger, which will call the callback.
After creating a projectile you should set
Projectile::callback, which is a
PROJECTILE_CALLBACK funcdef (defined in
Projectile.as), to point to a function.
The game provides some common functions you can use inside a callback in
Data/Scripts/ProjectileCallback.as, such as
The game also provide functions for easily creating projectiles such as