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