PoA_PRC8/_module/nss/membercheck3.nss
Jaysyn904 8d97886c3f Changed folder name.
Changed folder name.
2022-10-07 21:08:37 -04:00

36 lines
843 B
Plaintext

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));
}
}