Rune_PRC8/_module/nss/timestop_enter.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

31 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Timestop OnEnter
//:: timestop_enter
//:://////////////////////////////////////////////
/*
Adds the linked paralyze/freezani effect
to all creatures inside the timestop.
Checks for multiple (overlapping) timestops.
*/
//:://////////////////////////////////////////////
//:: Created By: merkury_black
//:: Created On: June 30, 2004
//:://////////////////////////////////////////////
void main()
{
object oEnter = GetEnteringObject();
if (oEnter == GetAreaOfEffectCreator() || GetIsDM(oEnter) || (GetTag(oEnter) == "nofreeze"))
return;
int nAffected = GetLocalInt(oEnter,"AffectedByTimestop");
if (!nAffected) {
SetLocalInt(oEnter,"AffectedByTimestop",1);
effect eParalyze = EffectCutsceneParalyze();
effect eFreeze = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
effect eApply = EffectLinkEffects(eFreeze,eParalyze);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eApply,oEnter);
}
else {
SetLocalInt(oEnter,"AffectedByTimestop",nAffected+1);
}
}