I got a friend to help me with the script for it. Here it is for anyone who wants to use it!
void LeverPulled(string &in asEntity, int alState)
{
if(GetLocalVarInt("Sequence") == 0 && asEntity == "lever_2")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
PlaySoundAtEntity("", "27_tunnel.snt", "Player", 0, false);
}
if(GetLocalVarInt("Sequence") == 1 && asEntity == "lever_1")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
PlaySoundAtEntity("", "27_tunnel.snt", "Player", 0, false);
}
if(GetLocalVarInt("Sequence") == 2 && asEntity == "lever_3")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
SetMoveObjectState("shelf_secret_door_1", 1);
PlaySoundAtEntity("", "scrape_wood_heavy.snt", "Player", 0, false);
PlaySoundAtEntity("", "27_tunnel.snt", "Player", 0, false);
StopSound("tunnel", 1.0f);
GiveSanityBoostsmall();
}
There you go. I think it is a bit simpler than the above script! ENJOY!
Small edit, fixing "tunnel" sound lasting for a LONG time!
(07-18-2012, 09:20 AM)Athom Wrote: I got a friend to help me with the script for it. Here it is for anyone who wants to use it!
void LeverPulled(string &in asEntity, int alState)
{
if(GetLocalVarInt("Sequence") == 0 && asEntity == "lever_2")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
PlaySoundAtEntity("", "27_tunnel.snt", "Player", 0, false);
}
if(GetLocalVarInt("Sequence") == 1 && asEntity == "lever_1")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
PlaySoundAtEntity("", "27_tunnel.snt", "Player", 0, false);
}
if(GetLocalVarInt("Sequence") == 2 && asEntity == "lever_3")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
SetMoveObjectState("shelf_secret_door_1", 1);
PlaySoundAtEntity("", "scrape_wood_heavy.snt", "Player", 0, false);
PlaySoundAtEntity("", "27_tunnel.snt", "Player", 0, false);
StopSound("tunnel", 1.0f);
GiveSanityBoostsmall();
}
There you go. I think it is a bit simpler than the above script! ENJOY!
Small edit, fixing "tunnel" sound lasting for a LONG time!
I give thanks for writing this script to andyrockin123 and Obliviator27! I love you guys! You RULE!