Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
55
_module/nss/ah_penta_inc.nss
Normal file
55
_module/nss/ah_penta_inc.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pentagram star
|
||||
//:: penta_inc
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Pentagram will appear over altar, requires ah_nonstaticinv object
|
||||
*/
|
||||
// This function will produce a pentagram at
|
||||
// lTargetLoc using nBeamFX for nDuration seconds.
|
||||
//
|
||||
void pentagram(location lTargetLoc, int nBeamFX=VFX_BEAM_EVIL, float fDuration=9.0);
|
||||
|
||||
void pentagram(location lTargetLoc, int nBeamFX=VFX_BEAM_EVIL, float fDuration=9.0)
|
||||
{
|
||||
int nEff = nBeamFX;
|
||||
object oArea = GetAreaFromLocation(lTargetLoc);
|
||||
// Define vertices for pentagram
|
||||
vector v = GetPositionFromLocation(lTargetLoc);
|
||||
v = Vector(v.x,v.y+7.0,v.z);
|
||||
location l1= Location(oArea,v,0.0);
|
||||
v = Vector(v.x-4.0,v.y-12.5,v.z);
|
||||
location l2= Location(oArea,v,0.0);
|
||||
v = Vector(v.x+10.5,v.y+8.0,v.z);
|
||||
location l3= Location(oArea,v,0.0);
|
||||
v = Vector(v.x-13,v.y,v.z);
|
||||
location l4= Location(oArea,v,0.0);
|
||||
v = Vector(v.x+10.5,v.y-8.0,v.z);
|
||||
location l5= Location(oArea,v,0.0);
|
||||
// Create verticies objects
|
||||
object oS1 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l1);
|
||||
object oS2 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l2);
|
||||
object oS3 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l3);
|
||||
object oS4 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l4);
|
||||
object oS5 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l5);
|
||||
// Connect vertices with beams
|
||||
effect eVis1 = EffectBeam(nEff,oS1,BODY_NODE_CHEST);
|
||||
effect eVis2 = EffectBeam(nEff,oS2,BODY_NODE_CHEST);
|
||||
effect eVis3 = EffectBeam(nEff,oS3,BODY_NODE_CHEST);
|
||||
effect eVis4 = EffectBeam(nEff,oS4,BODY_NODE_CHEST);
|
||||
effect eVis5 = EffectBeam(nEff,oS5,BODY_NODE_CHEST);
|
||||
// Make pentagram visible
|
||||
DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis1,oS2,fDuration));
|
||||
DelayCommand(1.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis2,oS3,fDuration));
|
||||
DelayCommand(2.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis3,oS4,fDuration));
|
||||
DelayCommand(3.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis4,oS5,fDuration));
|
||||
DelayCommand(4.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis5,oS1,fDuration));
|
||||
// Remove objects
|
||||
DelayCommand(fDuration,DestroyObject(oS1));
|
||||
DelayCommand(fDuration,DestroyObject(oS2));
|
||||
DelayCommand(fDuration,DestroyObject(oS3));
|
||||
DelayCommand(fDuration,DestroyObject(oS4));
|
||||
DelayCommand(fDuration,DestroyObject(oS5));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user