Battledale_PRC8/_module/nss/fr_crystal_on.nss
Jaysyn904 7b9e44ebbb 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.
2024-03-11 23:44:08 -04:00

32 lines
773 B
Plaintext

void main()
{
object oPC = GetEnteringObject();
int nIdx = 0;
object oTarget = GetObjectByTag("fr_crystal_glow",nIdx);
float fSpeed = 0.5;
float FDur = 50.0;
object oArea = GetObjectByTag("fr_iwd_i_xlair");
if(GetIsPC(oPC) == TRUE)
{
if (GetLocalInt(OBJECT_SELF,"nDone")!=1)
{
while (GetIsObjectValid(oTarget))
{
AssignCommand(oTarget, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, fSpeed, FDur));
SetPlaceableIllumination(oTarget, TRUE);
nIdx++;
oTarget = GetObjectByTag("fr_crystal_glow",nIdx);
}
SetLocalInt(OBJECT_SELF,"nDone",1);
}
if (GetLocalInt(OBJECT_SELF,"nDone")==1)
{
RecomputeStaticLighting(oArea);
}
}
}