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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help, again... :P
Zaapeer Offline
Junior Member

Posts: 32
Threads: 9
Joined: Dec 2011
Reputation: 0
#1
Help, again... :P

Okay so I have a problem. First off, I really appreciate the help i got in my last thread, but I I didn't really understand anything. So okay, here's what I want to do:
I have a machine that the player is supposed to start. In order to start it the player has to fill it with coal, two pieces to be excact. So I put an area in the machine were the coal is put, called "CoalArea". So this is the script I have for tha game to notice that there is coal put in the machine:


void OnStart()
{
if(GetLocalVarInt("Var_coals") == 2)
{
//Whatever is going to happen when the coal is put in the machine
}
AddEntityCollideCallback("Coal_1", "CoalArea", "CoalFunc", true, 1);

}


void CoalFunc(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var_coals", 1);
}

Now there are several pices of coal that you can put in the furnace. I want to make it so that it doesn't matter wich piece of coal you put in the furnace (since the coal pieces have different names). As long as there is two pieces of coal in the furnace the machine should be able to start. In order to start it, you pull a lever. How do I make it so that the lever only does something when there is two pieces of coal in the furnace? And how can I write so that the "CoalFunc" works with all the pieces of coal?

Please help!
Thank you Smile
10-27-2012, 11:50 AM
Find


Messages In This Thread
Help, again... :P - by Zaapeer - 10-27-2012, 11:50 AM
RE: Help, again... :P - by ZodiaC - 10-27-2012, 12:15 PM
RE: Help, again... :P - by i3670 - 10-27-2012, 12:49 PM
RE: Help, again... :P - by Zaapeer - 10-27-2012, 03:30 PM
RE: Help, again... :P - by ZodiaC - 10-27-2012, 12:57 PM
RE: Help, again... :P - by i3670 - 10-27-2012, 03:44 PM
RE: Help, again... :P - by Zaapeer - 10-27-2012, 04:24 PM
RE: Help, again... :P - by i3670 - 10-27-2012, 05:12 PM
RE: Help, again... :P - by Zaapeer - 10-27-2012, 08:00 PM
RE: Help, again... :P - by i3670 - 10-27-2012, 08:05 PM



Users browsing this thread: 2 Guest(s)