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
Script Help Script for 3 rods
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Script for 3 rods

Oh. So if the three rods is inserted something happens? I assume that's the case.
Spoiler below!

//Rods_* are the rods
//TouchArea_* are the script areas. They must be put where the holes are.
void OnStart()
{
for(int = b; b == 3; b++) AddEntityCollideCallback("Rods_*", "TouchArea_*", "RodsInsert", true, 1);
SetLocalVarInt("Rods", 0);
}

void RodsInsert(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Rods", 1);
RodsCheck();
}

void RodsCheck()
{
if(GetLocalVarInt("Rods") == 3)
{
//...Do something...//
}

else if(GetLocalVarInt("Rods") < 3)
{
}
}


"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 12-23-2013, 07:09 AM by PutraenusAlivius.)
12-23-2013, 07:07 AM
Find


Messages In This Thread
Script for 3 rods - by DethTrap - 12-23-2013, 05:25 AM
RE: Script for 3 rods - by PutraenusAlivius - 12-23-2013, 05:55 AM
RE: Script for 3 rods - by DethTrap - 12-23-2013, 06:30 AM
RE: Script for 3 rods - by PutraenusAlivius - 12-23-2013, 07:07 AM
RE: Script for 3 rods - by DethTrap - 12-23-2013, 07:59 AM
RE: Script for 3 rods - by Romulator - 12-23-2013, 08:49 AM
RE: Script for 3 rods - by DethTrap - 12-23-2013, 09:02 AM



Users browsing this thread: 1 Guest(s)