generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
34
_module/nss/timestop_exit.nss
Normal file
34
_module/nss/timestop_exit.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Timestop OnExit
|
||||
//:: timestop_exit.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Removes the paralyze/freezeani linked effect.
|
||||
Checks for multiple (overlapping) timestops.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: merkury_black
|
||||
//:: Created On: June 30, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oExit = GetExitingObject();
|
||||
if ((oExit == GetAreaOfEffectCreator()) || (GetIsDM(oExit)) || (GetTag(oExit) == "nofreeze"))
|
||||
return;
|
||||
int nAffected = GetLocalInt(oExit,"AffectedByTimestop")-1;
|
||||
if (nAffected<=0) {
|
||||
effect eRemove = GetFirstEffect(oExit);
|
||||
while (GetIsEffectValid(eRemove)) {
|
||||
if (GetEffectType(eRemove)==EFFECT_TYPE_CUTSCENE_PARALYZE) {
|
||||
RemoveEffect(oExit,eRemove);
|
||||
break;
|
||||
}
|
||||
eRemove = GetNextEffect(oExit);
|
||||
}
|
||||
DeleteLocalInt(oExit,"AffectedByTimestop");
|
||||
}
|
||||
else {
|
||||
SetLocalInt(oExit,"AffectedByTimestop",nAffected);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user