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
Making a lever puzzles...
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Making a lever puzzles...

Try this.

void OnStart()
{
AddEntityCollideCallback("Player", "questPrison", "GetSearchQuest", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_1", "GetRW", true, 1);
}

void GetSearchQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("memento05", "Memento05");
}
void GetRW(string &in asParent, string &in asChild, int alState)
{
AddQuest("memento06", "Memento06");
}

void LeverPuzzle(string &in asEntity, int alState)
{
if(alState == 1)
{
AddLocalVarInt("LeverPuzzle", 1);
}

if(alState == -1)
{
AddLocalVarInt("LeverPuzzle", -1);
}

if(GetLocalVarInt("LeverPuzzle") == 4)
{
if(GetLocalVarInt("LeverDone") == 1)
{
return;
}
SetEntityActive("childsnake_floor_water_normal_1", false);
SetLocalVarInt("LeverDone", 1);
}
}

Trying is the first step to success.
(This post was last modified: 12-03-2013, 05:41 PM by FlawlessHappiness.)
12-03-2013, 05:41 PM
Find


Messages In This Thread
Making a lever puzzles... - by Slanderous - 12-03-2013, 11:34 AM
RE: Making a lever puzzles... - by Slanderous - 12-03-2013, 12:34 PM
RE: Making a lever puzzles... - by FlawlessHappiness - 12-03-2013, 05:41 PM
RE: Making a lever puzzles... - by Slanderous - 12-03-2013, 06:22 PM



Users browsing this thread: 1 Guest(s)