![]() |
Is there anyway to trigger a billboard that is connected to a light? - 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: Is there anyway to trigger a billboard that is connected to a light? (/thread-22703.html) |
Is there anyway to trigger a billboard that is connected to a light? - jssjr90 - 09-03-2013 Is there anyway to trigger a billboard that is connected to a light? I am using a billboard for a bloom effect, and I do see that you can connect these to lights. But whenever I do connect them to a point light or spot light, the billboard does not do its command. This is what im trying to do. 1. The billboard would be triggering off the from the start. 2. When you enter an area trigger, the billboard fades in. 3. When you get out of the trigger, the billboard fades out. (fading to turn off) So this is my script so far, it should work but refuses too. void OnStart() { SetEntityActive("HDR1A_L", false); SetEntityActive("HDR1B_L", false); AddEntityCollideCallback("Player", "HDR1", "HDR1Active", false, 1); AddEntityCollideCallback("Player", "HDR1", "HDR1NonActive", false, -1); } void HDR1Active(string &in asParent, string &in asChild, int alState) { FadeLightTo("HDR1A_L", 1, 0.862, 0.655, 1, 1, 10); } void HDR1NonActive(string &in asParent, string &in asChild, int alState) { FadeLightTo("HDR1B_L", 0, 0, 0, 0, 0, 10); } Demonstration (Script is not in the video) http://www.youtube.com/watch?v=QNsZXdE1E_I So can anyone help please? ![]() RE: Is there anyway to trigger a billboard that is connected to a light? - Daemian - 09-03-2013 I don't think you need to set the billboards inactive, just turn off the lights connected to them. SetLightVisible lightname, false And the callbacks are not working, i guess? i don't think you can set two callbacks for the same parent+child. So put them together and try again. PHP Code: OnStart{ PHP Code: void HDR1Switch(string &in asParent, string &in asChild, int alState) RE: Is there anyway to trigger a billboard that is connected to a light? - jssjr90 - 09-03-2013 Solved it. ![]() void OnStart() { FadeLightTo("HDR1A_L", 0, 0, 0, 0, -1, 0); FadeLightTo("HDR1B_L", 0, 0, 0, 0, -1, 0); AddEntityCollideCallback("Player", "HDR1_Area", "HDR1Switch", false, 0); } void HDR1Switch(string &in asParent, string &in asChild, int alState) { if ( alState == 1 ) { FadeLightTo("HDR1A_L", 1, 0.862, 0.655, 1, -1, 10); } if ( alState == 1 ) { FadeLightTo("HDR1B_L", 1, 0.862, 0.655, 1, -1, 10); } if ( alState == -1 ) { FadeLightTo("HDR1A_L", 0, 0, 0, 0, -1, 10); } if ( alState == -1 ) { FadeLightTo("HDR1B_L", 0, 0, 0, 0, -1, 10); } } |