Standardized aura script: Difference between revisions

From Sinfar
(Added category)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:Aura standardized script}}
== Information ==
== Information ==
Script name: '''lat_stand_vfx'''
Script name: '''lat_stand_vfx'''

Revision as of 15:45, 12 December 2023


Information

Script name: lat_stand_vfx

Associated variables

  • AURA1_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.

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.
    }
}