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
[SOLVED] Still one problem to solve
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#10
RE: Still one problem to solve

I finaly did it with this script I made;
Spoiler below!
void OnStart()
{
SetEntityConnectionStateChangeCallback("Lever_1", "CheckIngredients");
}
////////////LEVER CHECK/////////////////
void CheckIngredients(string &in asEntity, int alState)
{
if(alState == 1)
{
if (GetLocalVarInt("oven_1_correct") == 1
&& GetLocalVarInt("oven_2_correct") == 1
&& GetLocalVarInt("oven_3_correct") == 1
&& GetLocalVarInt("oven_4_correct") == 1)
{

AddDebugMessage("OvenPuzzle: Correct!", false);
AddTimer("ovencomplete", 1, "CompleteOvenPuzzle");
}
else
{
AddDebugMessage("OvenPuzzle: Wrong!", false);
SetMessage("Messages", "IncorrectCombination", 0);
}
}
}

void PutObjectOven_1(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_1_correct", 1);
}
void DetachObjectOven_1(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_1_correct", 0);
}
void PutObjectOven_2(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_2_correct", 1);
}
void DetachObjectOven_2(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_2_correct", 0);
}
void PutObjectOven_3(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_3_correct", 1);
}
void DetachObjectOven_3(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_3_correct", 0);
}
void PutObjectOven_4(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_4_correct", 1);
}
void DetachObjectOven_4(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("oven_4_correct", 0);
}
void CompleteOvenPuzzle(string &in asTimer)
{
SetSwingDoorLocked("extaction_oven_6", false, true);
SetMessage("Messages", "correctcombinationchemicals", 0);
}

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
(This post was last modified: 10-24-2012, 09:23 PM by Steve.)
10-24-2012, 09:23 PM
Find


Messages In This Thread
[SOLVED] Still one problem to solve - by Steve - 10-14-2012, 08:42 PM
RE: Still one problem to solve - by Steve - 10-17-2012, 04:37 PM
RE: Still one problem to solve - by Akos115 - 10-17-2012, 10:01 PM
RE: Still one problem to solve - by The chaser - 10-18-2012, 06:41 AM
RE: Still one problem to solve - by Ongka - 10-18-2012, 09:08 AM
RE: Still one problem to solve - by Steve - 10-18-2012, 01:55 PM
RE: Still one problem to solve - by Ongka - 10-18-2012, 04:40 PM
RE: Still one problem to solve - by Akos115 - 10-18-2012, 04:48 PM
RE: Still one problem to solve - by Ongka - 10-18-2012, 04:53 PM
RE: Still one problem to solve - by Steve - 10-24-2012, 09:23 PM



Users browsing this thread: 1 Guest(s)