![]() |
Need help, again :P - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Need help, again :P (/thread-18921.html) |
RE: Need help, again :P - The chaser - 10-26-2012 Well, you've just put the same a different way, so I thought you didn't understand it ![]() 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. RE: Need help, again :P - Zaapeer - 10-27-2012 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? ![]() 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! ![]() RE: Need help, again :P - The chaser - 10-27-2012 (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?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); } |