[SCRIPT] Enabling Point Light when enter script area - 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: [SCRIPT] Enabling Point Light when enter script area (/thread-13037.html) |
Enabling Point Light when enter script area - heyitsrobert97 - 02-02-2012 I created a script where in a dark room when u enter the script area a firewood entity lights and a body appears on top of it. the script itself works but the fire doesn't give off much light. i put a point light above it, set it to inactive, and put in SetLightVisible(string& asLightName, bool abVisible); into the script but when i go there the light is still visible even before i enter the script area. { AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1); } void scare_fire(string &in asParent, string &in asChild, int alState) { SetEntityActive("firescare", true); SetEntityActive("firebody", true); SetLightVisible("firescarelight, 1); PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false); GiveSanityDamage(10.0f, false); } any idea on how to fix this? i tryed to attach prop to fire but the light is still there the same as before and doesn't change when i enter the area. Thank You RE: Enabling Point Light when enter script area - Tripication - 02-02-2012 { SetLightVisible("firescarelight, false); AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1); } void scare_fire(string &in asParent, string &in asChild, int alState) { SetEntityActive("firescare", true); SetEntityActive("firebody", true); SetLightVisible("firescarelight, true); PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false); GiveSanityDamage(10.0f, false); } Its a bool, bool is true/false If that doesn't work then i dunno, im having a rest after finishing outskirts oh, also void OnStart { SetLightVisible("firescarelight", false); AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1); } void scare_fire(string &in asParent, string &in asChild, int alState) { SetEntityActive("firescare", true); SetEntityActive("firebody", true); SetLightVisible("firescarelight", true); PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false); GiveSanityDamage(10.0f, false); } need these " RE: Enabling Point Light when enter script area - heyitsrobert97 - 02-02-2012 (02-02-2012, 11:27 AM)Tripication Wrote: {Thanks And I'm Downloading Your Custom Story Now It Looks Good RE: Enabling Point Light when enter script area - Tripication - 02-02-2012 lol, dont be dissapointed when its not. and no probs |