Levers in Order
void OnEnter()
{
SetEntityConnectionStateChangeCallback("lever_simple01_1", "SetSwingDoorLocked");
SetEntityConnectionStateChangeCallback("lever_simple01_2", "SetSwingDoorLocked");
SetEntityConnectionStateChangeCallback("lever_simple01_3", "SetSwingDoorLocked");
}
void SetSwingDoorLocked(string &in asEntity, int alState)
{
if(GetLocalVarInt("Sequence") == 0 && asEntity == "lever_simple01_2")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
}
if(GetLocalVarInt("Sequence") == 1 && asEntity == "lever_simple01_3")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
}
if(GetLocalVarInt("Sequence") == 2 && asEntity == "lever_simple01_1")
{
AddLocalVarInt("Sequence", 1);
SetLeverStuckState(asEntity, alState, true);
SetSwingDoorLocked("hatch_metal01_1", false, true);
PlayMusic("10_puzzle02.ogg", false, 0.3, 0.1, 10, false);
FadeLightTo("SpotLight_8", 0, 0, 0, 0, -1, 0.5f);
FadeLightTo("SpotLight_4", 0.4f, 0.5f, 0.9f, -1, -1, 0.5f);
}
}
is my current script. It forces the player to only pull levers in a correct order because you CANNOT pull then in any other way. It just wiggles if you pull the wrong one.
The order for my levers is 231.
But lets say I do 321. I pull lever 3, it wont stay in position. It HAS to be lever 2 first. Not much of a puzzle eh?
Thanks for the help in advance!
I figured it out. No need to read. Thanks again.
(This post was last modified: 08-13-2012, 07:34 AM by TheIcyPickle.)
|