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:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with a pipe puzzle
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#1
Help with a pipe puzzle

Hello I need help with using the "if" in my script, I just dont get it. So I have 3 pipes use them on 3 separate scripts and every time one placed right an pipe entity appears so the player sees that it's placed right. Now When all are placed right I want to swap a stuck valve with a valve that can be turned. So here's my script so far

Spoiler below!

void OnStart()
{
AddUseItemCallback("GetOil", "pipe_piece_1", "PipeArea1", "PipeQuest1", true);
AddUseItemCallback("GetOil", "pipe_piece_2", "PipeArea2", "PipeQuest2", true);
AddUseItemCallback("GetOil", "pipe_piece_3", "PipeArea3", "PipeQuest3", true);
}

///PIPEQUEST
void PipeQuest1(string &in asItem, string &in asEntity)
{
RemoveItem("pipe_piece_1");
SetEntityActive("Pipe1", true);
PlaySoundAtEntity("", "puzzle_place_jar.snt", "Player", 0, false);
}

void PipeQuest2(string &in asItem, string &in asEntity)
{
RemoveItem("pipe_piece_2");
SetEntityActive("Pipe2", true);
PlaySoundAtEntity("", "puzzle_place_jar.snt", "Player", 0, false);
}

void PipeQuest3(string &in asItem, string &in asEntity)
{
RemoveItem("pipe_piece_3");
SetEntityActive("Pipe3", true);
PlaySoundAtEntity("", "puzzle_place_jar.snt", "Player", 0, false);
}



I don't know how to script it to understand when all 3 pipes are placed right it should swap the stuck valve with the unstuck
Help appreciated! Smile

(This post was last modified: 05-23-2011, 04:16 PM by Rownbear.)
05-23-2011, 04:14 PM
Find


Messages In This Thread
Help with a pipe puzzle - by Rownbear - 05-23-2011, 04:14 PM
RE: Help with a pipe puzzle - by Kyle - 05-23-2011, 09:28 PM
RE: Help with a pipe puzzle - by Rownbear - 05-24-2011, 02:03 PM
RE: Help with a pipe puzzle - by SLAMnesia - 06-07-2011, 04:26 PM
RE: Help with a pipe puzzle - by DannieWest - 06-08-2011, 01:19 PM
RE: Help with a pipe puzzle - by Rownbear - 06-26-2011, 01:30 AM
RE: Help with a pipe puzzle - by Kyle - 06-26-2011, 01:49 AM



Users browsing this thread: 1 Guest(s)