SPAM Framework Documentation

VFX Settings

This is where you setup the VFX (Visual Effects) for an ability. An ability's VFX is handled in AbilityVFXHandler.

Warmup

Warmup VFX
The VFX to spawn at the beginning of the Warmup stage. This VFX is cached and will be reused on every cast.
The spawn position for the warmup is set though the actual ability component that's attached to a GameObject.

Warmup lifetime
Determines for how long the #^836894|warmup vfx should be active for after it's spawned.

Warmup custom scale
Since the warmup VFX gets its spawn position from its ability component, and you might want the warmup VFX to be spawned deep in a hierarchy to make it automatically move with an animation, you can set a custom scale to be used here.
This is useful if you for example attach the spawn position transform as a child of a staff, (which in turn is attached to a character's hands etc.) to make it automatically follow the staff when the character is animating, but for some reason any transform in the hierarchy needs a scale that isn't 1. You can then set a custom scale here to make your warmup-vfx have a scale that matches your needs.

Cast VFX

Cast VFX is spawned at some fixed point when the ability is cast. This can be everything from magic sparks flying out of the caster's hands to a muzzle flash.

Cast VFX
The VFX (prefab) that should be spawend.

Cast Rotation
The rotation that should be applied to the VFX

Initial
Keeps the rotation of the prefab used.

Caster forward
Will rotate the VFX the same direction the caster is face at the point of cast.

Fixed
A fixed rotation, effectively overriding the rotation on the VFX Prefab.

Cast Custom Scale
This scale will be set to the VFX when it's instantiated.

Impact VFX

Impact VFX is closely related to (but different from) on hit as on hit is always spawned on the target. Impact has a little more customisability to it.
If you have a directional ability like a ground slam, the Impact VFX would be that cracks that are spawned on the ground when the character slams the ground, and on hit would spawn on the targets to show which targets actually took damage.

Impact VFX
The VFX (prefab) that should the spawned when an ability has a valid Impact Point.

Impact rotation
The rotation of the VFX that's spawned.

Initial
Keeps the rotation of the prefab used.

Impact point normal
The normal of the Impact Point

Fixed
A fixed rotation, effectively overriding the rotation on the VFX Prefab.

Impact Custom Scale
This scale will be set to the VFX when it's instantiated.

Impact Spawn Position
Where the impact VFX should be spawned

Fixed position
The VFX will spawn in the position set on the ability component

Ground of Target then Impact
If the ability is cast on a target, this will raycast down to the ground of the target to find the position for the VFX. If no target was given when the ability was cast, then Impact Point will be used.

Ground of Impact
The VFX will spawn at the ground of the Impact Point. The position of the ground is resolved with a raycast.

Impact point
The VFX will spawn at the Impact Point

Impact Spawn Offset
The offset to add to the resolved position of the VFX. This is especially useful when you spawn the impact VFX on the ground, as spawning it dead on the ground will most likely make it look teared or have some other visual glitches.

On hit VFX

On hit VFX
The on hit VFX to be spawned when an ability hits a target or position.

Num of On Hit Instances
Since the on hit VFX is pooled, you have to set the number of instances you want to pre-spawn at startup. This setting can be either Same As Max Targets, Custom, or Shared pool.

Same As Max Targets
This will spawn as many VFX instances as the maximum effect targets of the ability. Useful if you want to display a quick hit effect when firing a shotgun for example.

Custom
This will spawn the given value of VFX instances. Useful when you want a projectile that explodes at the impact point or an ability that fires rapidly like a machine-gun.

Shared pool
This will make the VFX show up in the Pooling window. When this is chosen the On Hit VFX will get instances from a common pool, shared amoung all usages of the VFX. This is useful if you have many abilities with the same On Hit VFX, or many units casting the same ability.

On hit spawn point
Can be set to either Targets or Impact point

Targets
Will spawn the VFX at the center of the target if not 'Spawn on hit at target base' is checked.

Impact point
Will spawn the VFX at the point of impact, i.e. the cast point or where a projectile hits.

On hit position offset
The offset to be applied to the spawned VFX.

Life time handling
Can be set to either automatic or manual.

Automatic
The VFX handles it's own lifetime. Useful when you have a one-shot VFX/particle effect that doesn't loop and can be left alive after it's done.

Manual
This setting will allow you to set a custom lifetime for the VFX. If you set this to 0 it will have the same effect as Automatic.

Backlinks: