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
#5
RE: Help, again... :P

(10-27-2012, 12:49 PM)i3670 Wrote: void OnStart()
{

for(int i=1;i<=5;i++){
AddEntityCollideCallback("Coal_"+i+"", "CoalArea", "CoalFunc", false, 1);
}

}

void CoalFunc(string &in asParent, string &in asChild, int alState)
{

AddLocalVarInt("Var_coals", 1);
CoalLocal();

}

void CoalLocal()
{
if(GetLocalVarInt("Var_coals") == 2)
{
SetEntityConnectionStateChangeCallback("LEVERNAME", "func_furnace");
}
}

void func_furnace(string &in asEntity, int alState)
{
if (alState == 1)
{
whatever happends when the lever is pulled and 2 coals are inside
}
}

I think that should work.


Thank you, that worked! Smile I just changed some stuff, for exampel alState. I changed it to -1 so that the machine will start working when you pull the lever down instead of up Smile I have another question though. Under void Onstart() I use "SetPropEffectActive("Coal_"+i+"", false, false);", wich makes the coal black. How do I make it so that when I pull the lever, only the coal inside it starts glowing? "SetPropEffectActive("Coal_"+i+"", true, false);" is the command to make coal glow.
10-27-2012, 03:30 PM
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: 1 Guest(s)