PWE_PRC8/_module/nss/mf_opendoor3.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

44 lines
1.4 KiB
Plaintext

//::///////////////////////////////////////////////
//:: 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);
// open a set door in red level
ActionOpenDoor(GetObjectByTag("door_pc140204c"));
object oPC = GetLastUsedBy();
//Create new or use existing sound to warn player
SoundObjectPlay(GetObjectByTag("LightingPillar"));
FloatingTextStringOnCreature("You hear a muffled rumbling a long way beneath you", oPC);
}