Shargast_PRC8/_module/Chapter 2/nss/lever_hmgdc003.nss
Jaysyn904 66a0a3e043 Initial commit
Initial commit.
2024-08-03 14:13:18 -04:00

19 lines
457 B
Plaintext

void main()
{
object oDoor = GetObjectByTag("hmgdn_003");
int nMyStat = GetLocalInt(OBJECT_SELF,"sLeverStateStored");
if(nMyStat == 0)
{
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
SetLocalInt(OBJECT_SELF,"sLeverStateStored",1);
ActionUnlockObject(oDoor);
ActionOpenDoor(oDoor);
}
else
{
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
SetLocalInt(OBJECT_SELF,"sLeverStateStored",0);
ActionCloseDoor(oDoor);
}
}