Changed folder name.
Changed folder name.
This commit is contained in:
35
_module/nss/membercheck3.nss
Normal file
35
_module/nss/membercheck3.nss
Normal file
@@ -0,0 +1,35 @@
|
||||
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);
|
||||
|
||||
object oPC = GetLastOpenedBy();
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
|
||||
if(!GetIsPC(oPC)) return;
|
||||
|
||||
|
||||
if (GetLocalInt(oPC, "IMemberA")<= 0)
|
||||
{
|
||||
oTarget = GetWaypointByTag("home");
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user