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
Rod Puzzle
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Rod Puzzle

void OnStart()
{

AddUseItemCallback("", "Rod_1", "ScriptArea_1", "UseRod_1", true);
///Rod_1 = 1st rod ///ScriptArea_1 is around the first hole
AddUseItemCallback("", "Rod_2", "ScriptArea_2", "UseRod_2", true);
///Rod_2 = 2nd rod ///ScriptArea_2 is around the second hole
AddUseItemCallback("", "Rod_3", "ScriptArea_3", "UseRod_3", true);
///Rod_3 = 3rd rod ///ScriptArea_3 is around the third hole
}

void UseRod_1(string &in asItem, string &in asEntity)
{
SetEntityActive("Rod_1_Static", true); ///Place a static rod inside the hole inactive
RemoveItem("Rod_1); ///This will remove it from the inventory

AddLocalVarInt("3_Rods", 1); ///Adds 1 to the LocalVarInt

if(GetLocalVarInt("3_Rods") == 3) ///Check if the LocalVarInt = 3
{
///Do stuff when all 3 has been placed
}
}

void UseRod_2(string &in asItem, string &in asEntity)
{
SetEntityActive("Rod_2_Static", true);
RemoveItem("Rod_2);

AddLocalVarInt("3_Rods", 1); ///Adds 1 to the LocalVarInt

if(GetLocalVarInt("3_Rods") == 3) ///Check if the LocalVarInt = 3
{
///Do stuff when all 3 has been placed
}
}

void UseRod_3(string &in asItem, string &in asEntity)
{
SetEntityActive("Rod_3_Static", true);
RemoveItem("Rod_3);

AddLocalVarInt("3_Rods", 1); ///Adds 1 to the LocalVarInt

if(GetLocalVarInt("3_Rods") == 3) ///Check if the LocalVarInt = 3
{
///Do stuff when all 3 has been placed
}
}

Everything with red color should be deleted

Trying is the first step to success.
(This post was last modified: 06-12-2012, 03:29 PM by FlawlessHappiness.)
06-12-2012, 03:27 PM
Find


Messages In This Thread
Rod Puzzle - by BrooksyFC - 06-12-2012, 03:14 PM
RE: Rod Puzzle - by FlawlessHappiness - 06-12-2012, 03:27 PM
RE: Rod Puzzle - by Putmalk - 06-13-2012, 11:18 PM
RE: Rod Puzzle - by BrooksyFC - 06-12-2012, 03:49 PM
RE: Rod Puzzle - by FlawlessHappiness - 06-12-2012, 04:09 PM
RE: Rod Puzzle - by BrooksyFC - 06-12-2012, 06:57 PM
RE: Rod Puzzle - by FlawlessHappiness - 06-12-2012, 07:17 PM
RE: Rod Puzzle - by Adny - 06-12-2012, 07:28 PM
RE: Rod Puzzle - by FlawlessHappiness - 06-12-2012, 07:55 PM
RE: Rod Puzzle - by BrooksyFC - 06-13-2012, 08:44 AM
RE: Rod Puzzle - by BrooksyFC - 06-13-2012, 08:47 PM
RE: Rod Puzzle - by FlawlessHappiness - 06-13-2012, 09:37 PM
RE: Rod Puzzle - by BrooksyFC - 06-13-2012, 09:59 PM
RE: Rod Puzzle - by Adny - 06-14-2012, 12:05 AM
RE: Rod Puzzle - by BrooksyFC - 06-16-2012, 11:56 AM
RE: Rod Puzzle - by FlawlessHappiness - 06-16-2012, 12:46 PM
RE: Rod Puzzle - by BrooksyFC - 06-16-2012, 01:42 PM
RE: Rod Puzzle - by BrooksyFC - 06-18-2012, 08:17 AM
RE: Rod Puzzle - by Dutton - 06-18-2012, 08:47 AM
RE: Rod Puzzle - by BrooksyFC - 06-18-2012, 09:54 AM
RE: Rod Puzzle - by Adny - 06-18-2012, 11:02 AM
RE: Rod Puzzle - by BrooksyFC - 06-18-2012, 11:58 AM
RE: Rod Puzzle - by Adny - 06-18-2012, 12:05 PM
RE: Rod Puzzle - by FlawlessHappiness - 06-18-2012, 03:58 PM
RE: Rod Puzzle - by BrooksyFC - 06-19-2012, 08:13 AM
RE: Rod Puzzle - by BrooksyFC - 06-19-2012, 11:20 PM
RE: Rod Puzzle - by Adny - 06-20-2012, 01:20 AM
RE: Rod Puzzle - by BrooksyFC - 06-20-2012, 08:27 AM
RE: Rod Puzzle - by BrooksyFC - 06-20-2012, 03:39 PM



Users browsing this thread: 1 Guest(s)