generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
43
_module/nss/bh_beh_trigporta.nss
Normal file
43
_module/nss/bh_beh_trigporta.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
oPC=GetLastUsedBy();
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
|
||||
// * Play Appropriate Animation
|
||||
if (!nActive== 1)
|
||||
//if (!nActive)
|
||||
{
|
||||
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",1);
|
||||
object oBeholderwaypoint = GetObjectByTag("Beholdwp");
|
||||
|
||||
location lLocation = GetLocation(oBeholderwaypoint);
|
||||
CreateObject(OBJECT_TYPE_PLACEABLE,"beholderport",lLocation);
|
||||
|
||||
|
||||
FloatingTextStringOnCreature(" Secret Portal Active!",oPC);
|
||||
PlaySound("al_mg_crystalev1");
|
||||
object oGetRid = GetObjectByTag("Beholder_port");
|
||||
DelayCommand(30.0,DestroyObject(oGetRid));
|
||||
DelayCommand(31.0,ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||||
DelayCommand(32.0,SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",0));
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("The mechanism appears to be stuck.",oPC);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user