Frictional Games Forum (read-only)
Problem with lights? - 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: Problem with lights? (/thread-20163.html)



Problem with lights? - Storfigge - 02-03-2013

Why won't this work?

void OnStart()
{
AddEntityCollideCallback("Player", "light", "LitLight", true, 1);
}

void LitLight(string &in asParent, string &in asChild, int alState)
{
SetLightVisible("altar_lamp_1", true);
SetLightVisible("altar_lamp_2", true);
SetLightVisible("altar_lamp_3", true);
SetLightVisible("altar_lamp_4", true);
}

void OnEnter()
{

}


void OnLeave()
{

}


I want the altar lamps to become lit.


RE: Problem with lights? - Your Computer - 02-03-2013

Lights are not lamps (assuming you're trying to turn on a lamp entity).


RE: Problem with lights? - NaxEla - 02-03-2013

Try adding a debug message in your LitLight function. If you see the message, that means you probably have wrote the names wrong for the lights.


RE: Problem with lights? - Storfigge - 02-03-2013

(02-03-2013, 08:48 PM)Your Computer Wrote: Lights are not lamps (assuming you're trying to turn on a lamp entity).

Yea that's what I'm trying to do Tongue how do I do so the lamps become lit?


RE: Problem with lights? - NaxEla - 02-03-2013

(02-03-2013, 08:55 PM)Storfigge Wrote:
(02-03-2013, 08:48 PM)Your Computer Wrote: Lights are not lamps (assuming you're trying to turn on a lamp entity).

Yea that's what I'm trying to do Tongue how do I do so the lamps become lit?

Code:
void SetLampLit(string& asName, bool abLit, bool abEffects);



RE: Problem with lights? - Storfigge - 02-03-2013

(02-03-2013, 09:00 PM)NaxEla Wrote:
(02-03-2013, 08:55 PM)Storfigge Wrote:
(02-03-2013, 08:48 PM)Your Computer Wrote: Lights are not lamps (assuming you're trying to turn on a lamp entity).

Yea that's what I'm trying to do Tongue how do I do so the lamps become lit?

Code:
void SetLampLit(string& asName, bool abLit, bool abEffects);

Thanks for the quick answer Smile


RE: Problem with lights? - NaxEla - 02-03-2013

No problem Smile Don't forget about the wiki page: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

It has every function on there and it's all nice and organized Smile