Initial upload
Initial upload
This commit is contained in:
50
_module/nss/obj_hb_bubble.nss
Normal file
50
_module/nss/obj_hb_bubble.nss
Normal file
@@ -0,0 +1,50 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Talo Nightsoul
|
||||
//:: obj_hb_bubble
|
||||
//:: Copyright (c) 2003 Talo Nightsoul
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A Random Vector effect script (Bubble, Fireworks)
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Talo Nightsoul & Darren Summerwind
|
||||
//:: Created On: 21/10/2003
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void BubbleEffect()
|
||||
{
|
||||
//Random location generation
|
||||
int iX = d12()-6;
|
||||
float fX = IntToFloat(iX);
|
||||
int iY = d12()-6;
|
||||
float fY = IntToFloat(iY);
|
||||
int iZ = d6();
|
||||
float fZ = IntToFloat(iZ);
|
||||
vector BUBBLEtoEFFECT = Vector(fX, fY, fZ);
|
||||
object oBubble = OBJECT_SELF;
|
||||
vector vApplyEffect = GetPosition(oBubble) + BUBBLEtoEFFECT;
|
||||
location lApplyEffect = Location(GetArea(oBubble), vApplyEffect, 0.0);
|
||||
|
||||
//Delay and Effect Defining
|
||||
effect eBubble = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
||||
effect eSplat = EffectVisualEffect(VFX_IMP_MAGBLUE);
|
||||
float fRandDelay = IntToFloat( d3() );
|
||||
float fDelay = 5.0f;
|
||||
float fFinal = fRandDelay+3.4f;
|
||||
|
||||
//Apply Effects
|
||||
DelayCommand(fRandDelay, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eBubble, lApplyEffect, fDelay));
|
||||
DelayCommand(fFinal, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eSplat, lApplyEffect));
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Anti AI-overflow
|
||||
ClearAllActions(TRUE);
|
||||
//Do three times
|
||||
BubbleEffect();
|
||||
|
||||
BubbleEffect();
|
||||
|
||||
BubbleEffect();
|
||||
}
|
||||
Reference in New Issue
Block a user