Initial Commit
Initial Commit [v1.01]
This commit is contained in:
51
_module/nss/activate_killclo.nss
Normal file
51
_module/nss/activate_killclo.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: OnUse: Toggle Activate
|
||||
//:: x2_plc_used_act
|
||||
//:: Copyright (c) 2003 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
Simple script to toggle the placeable animation
|
||||
state for placeables that support Activate and
|
||||
DeActivate Animations
|
||||
|
||||
Placeables are best set to be DeActivated by
|
||||
default with this script.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Georg Zoeller
|
||||
//:: Created On: 2003-09-10
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
// * note that nActive == 1 does not necessarily mean the placeable is active
|
||||
// * that depends on the initial state of the object
|
||||
int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
|
||||
// * Play Appropriate Animation
|
||||
if (!nActive)
|
||||
{
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||||
}
|
||||
// * Store New State
|
||||
SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",!nActive);
|
||||
|
||||
if (GetLocalInt(GetModule(), "Incubator") >= 1)
|
||||
{
|
||||
ActionSpeakString ("Terminating Clone");
|
||||
ExecuteScript("killclones", OBJECT_SELF);
|
||||
SetLocalInt(GetModule(), "UnAuthUse", (GetLocalInt(GetModule(), "UnAuthUse") +1));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionSpeakString ("No Clones Currently Prepared.");
|
||||
}
|
||||
if (GetLocalInt(GetModule(), "UnAuthUse")==5)
|
||||
{
|
||||
ExecuteScript("intruder_alert", OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user