Standardized aura script

From Sinfar
Revision as of 12:43, 14 December 2023 by Fiery Imp (talk | contribs) (Added list of VFX link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Information

Script name: lat_stand_aura

Associated variables

  • AURA_ID
  • AURA2_ID
  • AURA3_ID
  • AURA4_ID
  • AURA5_ID

How to use

Item needs the following property (see image on the right)

The script name must be set in EVENT_USE according to the Variable based event system.

The script can support up to 5 VFX, to add a VFX, give the ID of desired VFX in the associated variable mentioned in the information section.

Its important to set all the AURA_ID variable to -1, otherwise they are set to 0 by default and you will get a blue glow VFX on the character.


The list of VFX can be found here : https://www.sinfar.net/visualeffects.html

Alternative

As an alternative, you can make your own aura script if needed with the help of the lat_inc_aura include script.

Here is an example on how to use it. The resulting script must of course be applied the same as the standardized script described above.

#include "lat_inc_aura"

//Standardized Aura Script to be applied on EVENT_USE

void main()
{
    //These variable are available as well
    // oItem = the item which triggered the script
    // oPC = the character possessing oItem
    
    //Nothing else need to be added before this, check with FieryImp or Badger if you think you need something before the if.
    
    if(LAT_CanApplyAura())
    {
        //This where you set the VFX, the only function call you will ever need to make here is LAT_SetVFX(int iVfxId);
       LAT_SetVFX(0); //Call this as many time as needed to set a VFX where 0 can be replaced with teh vfx id of your choice.
    }
}