The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Levers in Order
TheIcyPickle Offline
Member

Posts: 80
Threads: 16
Joined: Feb 2011
Reputation: 0
#1
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.)
08-13-2012, 07:10 AM
Find


Messages In This Thread
Levers in Order - by TheIcyPickle - 08-13-2012, 07:10 AM
RE: Levers in Order - by FlawlessHappiness - 08-13-2012, 09:36 AM
RE: Levers in Order - by TheIcyPickle - 08-13-2012, 09:43 AM
RE: Levers in Order - by FlawlessHappiness - 08-13-2012, 10:36 AM
RE: Levers in Order - by Theforgot3n1 - 08-13-2012, 11:13 AM
RE: Levers in Order - by TheIcyPickle - 08-13-2012, 07:39 PM
RE: Levers in Order - by Theforgot3n1 - 08-13-2012, 08:22 PM
RE: Levers in Order - by TheIcyPickle - 08-13-2012, 08:40 PM



Users browsing this thread: 1 Guest(s)