No edit summary |
(Added list of VFX link) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Aura standardized script}} | |||
== Information == | == Information == | ||
Script name : ''' | Script name: '''lat_stand_aura''' | ||
Associated variables | Associated variables | ||
* | * AURA_ID | ||
* AURA2_ID | * AURA2_ID | ||
* AURA3_ID | * AURA3_ID | ||
Line 19: | Line 21: | ||
'''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.''' | '''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.<syntaxhighlight lang="c++" line="1"> | |||
#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. | |||
} | |||
} | |||
</syntaxhighlight> | |||
[[Category:Builders Tools]] | |||
{{DEFAULTSORT:Aura standardized script}} |
Latest revision as of 12:43, 14 December 2023
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.
}
}