Skip to content

Free Aiming For Spells

szapp edited this page Oct 30, 2017 · 23 revisions

The feature Free Aiming for Spells (GFA_SPELLS) implements free aiming for spell combat. There is not much room for configuration. For adjustments to the reticle for spells, see reticle adjustments.
 

Contents

1.   Config Functions
    1.1.   GFA_ShiftAimVob
2.   Aim Vob Helper Functions
    2.1.   GFA_AimVobAttachFX
    2.2.   GFA_AimVobDetachFX


Config Functions

The configuration of this feature is found in the file config/spells.d.

GFA_ShiftAimVob

This function is called continuously while aiming with spells to correct the aim vob position.
It should never be of use and should be adjusted for individual spells only. Usually, no spell requires the aim vob to be shifted. Exceptions are spells that utilize the aim vob as target to spawn VFX on it with the functions GFA_AimVobAttachFX and GFA_AimVobDetachFX.

func int GFA_ShiftAimVob(var int spellID)
spellID Active spell ID (e.g. SPL_Firebolt)
return Distance in centimeters to shift the aim vob along the viewing angle of the camera.

Aim Vob Helper Functions

These functions are provided by GFA an aid in visualizing the aim vob. They may be used in the functions above documented.

GFA_AimVobAttachFX

This is not a config function. It is a function provided by GFA and can be called from outside.
Attach a visual FX to the aim vob. This function is never used internally, but is useful for spells that visualize the aim vob.
This function should go hand in hand with detaching the visual FX (GFA_AimVobDetachFX): If you attach an FX, you should make sure to remove the FX, when it is no longer needed.

func void GFA_AimVobAttachFX(string effectInst)
effectInst VisualFX instance to attach (e.g. "spellFX_LIGHTSTAR_WHITE")

 

GFA_AimVobDetachFX

This is not a config function. It is a function provided by GFA and can be called from outside.
Detach the visual FX from the aim vob, that was previously spawned with GFA_AimVobAttachFX.

func void GFA_AimVobDetachFX()