Frictional Games Forum (read-only)

Full Version: Problem with lights?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Lights are not lamps (assuming you're trying to turn on a lamp entity).
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.
(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?
(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);
(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
No problem Smile Don't forget about the wiki page: http://wiki.frictionalgames.com/hpl2/amn..._functions

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