Changed folder name.
Changed folder name.
This commit is contained in:
161
_module/nss/glowmebaby.nss
Normal file
161
_module/nss/glowmebaby.nss
Normal file
@@ -0,0 +1,161 @@
|
||||
//Script Name:
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/13/08
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
Create Your Own FX for Objects ***TEMPLATE***
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
IMPORTANT: This script must go in the OnHeartbeat event of an
|
||||
object which is NOT static! (Making it Plot is Recommended)
|
||||
|
||||
NOTE: You can only apply 1 effect to an object with THIS script.
|
||||
|
||||
NOTE: While, you can apply a just about any visual effect to an
|
||||
object, you CANNOT apply effects to invisible objects IF they
|
||||
apply the effect directly to the object. (Like Stone Skin)
|
||||
Because the object is invisible, and it won't show. All of
|
||||
the NON-Permanent effects will be applied at the center of the
|
||||
object. (I used a lot of invisible objects)
|
||||
|
||||
IMPORTANT: You MUST use VFX_DUR_ Constants for ALL Permanent and
|
||||
Temporary Effects, All of the other constants are instant only,
|
||||
like VFX_FNF / VFX_COM_ / or VFX_IMP
|
||||
|
||||
VFX_BEAM_ & VFX_EYES_ Constants CANNOT be used in this script, sorry.
|
||||
|
||||
You can creatively make a lot of different things, the visual effects
|
||||
make placeables appear magical, and the instant visual effects could
|
||||
make some objects more meaningful, or be used for cutscenes, all in all
|
||||
this script can add A LOT of flash an pizzazz to ANY module.
|
||||
|
||||
IMPORTANT: However, this script fires every 6 seconds, SO, you don't
|
||||
want to use a lot of placebles in a module with VFXs on them, or
|
||||
the game play could be slowed (causing lag) considerably, depending
|
||||
upon just how many of these FXs you place in a module. I do not recommend
|
||||
you exceed 10 / area, and I don't recommend you put more than 100 of these
|
||||
in a module. The less of these you use the more impact they have on the player.
|
||||
Please keep in mind some players may not have good Graphic's Cards,
|
||||
so overdoing the FXs in an area might just crash their PC!
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////IMPORTANT SETTINGS///////////////////////////////
|
||||
|
||||
//Set this to 1 for Permanent Effects
|
||||
//Set this to 2 for a Temporary VFXs (Duration Required)
|
||||
//Set this to 3 for Instant FXs (These are applied every 3 seconds infinitely)
|
||||
const int nFX = 1; //Default = 1 PERMANENT (VFX_DUR_ ONLY!)
|
||||
|
||||
//This determines how long the Temporary FXs last(in Seconds)
|
||||
const float fDur = 300.0;// the range = 1.0 - 1200.0 (20 Minutes MAXIMUM!)
|
||||
//(USE PERMANENT if you want to go over 20 minutes)
|
||||
|
||||
//This determines how many times you wish to run the Instant VFXs
|
||||
//every Heartbeat-(6 Seconds) ****USE ONLY 1 - 7****
|
||||
//NOTE: 7 = Randomly Fires ONCE every Heartbeat(Inconsistency is nice)
|
||||
const int nTimes = 2; //Default = 2 (once every 3 seconds)
|
||||
|
||||
//The tab "Constants" to the right will help you find the VFX_
|
||||
//Replace the VFX_DUR below with the one you choose.
|
||||
const int nConstant = VFX_DUR_GLOW_LIGHT_BLUE;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
///////WARNING: DON'T TOUCH ANYTHING BELOW THIS LINE!!!////////////
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oSelf = OBJECT_SELF;
|
||||
|
||||
//If we are using Permanent Effects..
|
||||
if(nFX==1)
|
||||
{
|
||||
//If the FX has been applied stop here..
|
||||
if(GetLocalInt(oSelf, "FX_ACTIVE")==1)
|
||||
{return;}
|
||||
//If not then, lets apply the Permanent visual effect
|
||||
else
|
||||
{
|
||||
SetLocalInt(oSelf, "FX_ACTIVE", 1);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(nConstant), oSelf);
|
||||
}
|
||||
}
|
||||
//If we are doing Temporary VFX (one time only)
|
||||
else if(nFX ==2)
|
||||
{
|
||||
//If the FX has been applied stop here..
|
||||
if(GetLocalInt(oSelf, "FX_ACTIVE")==1)
|
||||
{return;}
|
||||
//If not then, lets apply the visual effect
|
||||
else
|
||||
{
|
||||
SetLocalInt(oSelf, "FX_ACTIVE", 1);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nConstant), oSelf, fDur);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//If we are doing Instant effects..
|
||||
else if(nFX ==3)
|
||||
{
|
||||
//2 X / Heartbeat
|
||||
if(nTimes == 2)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf);
|
||||
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
}
|
||||
//3X / Heartbeat
|
||||
else if(nTimes == 3)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf);
|
||||
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
}
|
||||
//4X / Heartbeat
|
||||
else if(nTimes == 4)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf);
|
||||
DelayCommand(1.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(4.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
}
|
||||
//5X / Heartbeat
|
||||
else if(nTimes == 5)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf);
|
||||
DelayCommand(1.25, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(2.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(3.75, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
}
|
||||
//6X / Heartbeat
|
||||
else if(nTimes == 6)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf);
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
}
|
||||
//1 Randomly Timed Effect / Heartbeat
|
||||
else if(nTimes == 7)
|
||||
{
|
||||
int nDice = d6(1);
|
||||
float fRandom = IntToFloat(nDice);
|
||||
DelayCommand(fRandom, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf));
|
||||
}
|
||||
//All other instances = 1 time / heartbeat!
|
||||
else
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nConstant), oSelf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Main Script End
|
||||
}
|
Reference in New Issue
Block a user