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
Need help, again :P
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#21
RE: Need help, again :P

Well, you've just put the same a different way, so I thought you didn't understand it Wink

I see that you understand it perfectly. But, maybe this helped a guest or something like that.

Back to topic: You could do several "if"'s or a "for" for this. Try disabling the interaction with the entity, or putting a blockbox to it. It may be the solution.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 04:41 PM
Find
Zaapeer Offline
Junior Member

Posts: 32
Threads: 9
Joined: Dec 2011
Reputation: 0
#22
RE: Need help, again :P

Okay guys, I gave it a shot, and here's what my script looks like now, it doesn't work though.. Could you correct it? Smile


void OnStart()
{
if(GetLocalVarInt("Var_coals")==1)
{
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetLightVisible("hanging_lantern_ceiling_chain_2", false);
}
AddEntityCollideCallback("Coal_1", "CoalArea", "CoalFunc", true, 1); //CoalArea is the area in the furnace
}

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

I'm just trying with one peice of coal right now, just to make it work. Please help! Smile
10-27-2012, 12:17 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#23
RE: Need help, again :P

(10-27-2012, 12:17 AM)Zaapeer Wrote: Okay guys, I gave it a shot, and here's what my script looks like now, it doesn't work though.. Could you correct it? Smile


void OnStart()
{
if(GetLocalVarInt("Var_coals")==1)
{
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetLightVisible("hanging_lantern_ceiling_chain_2", false);
}
AddEntityCollideCallback("Coal_1", "CoalArea", "CoalFunc", true, 1); //CoalArea is the area in the furnace
}

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

I'm just trying with one peice of coal right now, just to make it work. Please help! Smile
You were putting the var in the void OnStart. It should be like this:


void OnStart()
{
AddEntityCollideCallback("Coal_1", "CoalArea", "CoalFunc", true, 1); //CoalArea is the area in the furnace
}

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


void FURNACE()
if(GetLocalVarInt("Var_coals")==1)
{
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetLightVisible("hanging_lantern_ceiling_chain_2", false);
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-27-2012, 08:24 PM
Find




Users browsing this thread: 2 Guest(s)