Frictional Games Forum (read-only)
Making a trigger to turn lights off? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Making a trigger to turn lights off? (/thread-6077.html)



Making a trigger to turn lights off? - Neatherblade - 01-06-2011

Have been looking on the wiki for a function to turn the lights of when walking over a trigger, have only found this one SetLampLit, but i have no success to make it work.

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

Or do i use something else?


RE: Making a trigger to turn lights off? - Som1Lse - 01-06-2011

It would help if you posted your script.


RE: Making a trigger to turn lights off? - Frontcannon - 01-06-2011

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

asName = name of the lamp entity
abLit = boolean (true / false) if the lamp should be lit or not
abEffects = another boolean if the engine should use effects to light the lamp (basically, this means you will see the flame appear and the shine, false would just switch it into the lit-state, use it when the player can see the lamp)


RE: Making a trigger to turn lights off? - adamhun - 01-06-2011

It only turns off lamps, not lights (for me at least). I tried SetEntityActive too, but that wasn't working either.


RE: Making a trigger to turn lights off? - Frontcannon - 01-06-2011

For lights use SetLightVisible.


RE: Making a trigger to turn lights off? - adamhun - 01-06-2011

ahhh. thanks ^^