Frictional Games Forum (read-only)

Full Version: Amnesia Custom story Thunder Doesnt flash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all
I am making a new custom story to the amnesia dark descent. On the first map I want to have thunder outside but my problem is I can hear its sound but I cant see its flash, I tried several ways to fix it but I cant. (For example to get the flicker active with a script) I asked help from an advanced youtuber as well, and he told me to post a new thread. Anyone has an idea how to fix it? + Screenshot link: http://www.mediafire.com/view/l8eoxxn8j6...-00-81.png (It's bigger than 500kb)
Try
PHP Code:
SetLampLit(string &in asEntitybool abLit); 

With use of timers to quickly turn it back off. Something like this should work.

PHP Code:
void OnStart()
{
SetLampLit("BoxLight_1"false);          //turn light off
AddTimer("LightOn"12.0"Lightning");
}

void Lightning(string &in asTimer);
{
if(
asTimer == "LightOn")
{
SetLampLit("BoxLight_1"true);
//for variety, you could RandFloat(); here, and call it in timer.
AddTimer("LightOff"0.2f"Lightning");
AddTimer("Thunder"2.9f"Lightning");
}
elseif(
asTimer == "LightOff")
{
SetLampLit("BoxLight_1"false);
}
elseif(
asTimer == "Thunder")
{
//Place Thunder sound(s) here.
//Would be a great idea to RandFloat here. So you can
//randomly have another thunder sequence start.
//Here's one you can test, not sure if it will error.
//Forgotten how to RandFloat(); and can't check Engine Scripts now. P:
//AddTimer("LightOn", RandFloat(25.0f, 55.0f), "Lightning");
AddTimer("LightOn"41.0f"Lightning");

SetLampLit only works for lamp entities iirc, so considering this is a light object, I think you must replace that with SetLightVisible or FadeLightTo. I'm just a bit curious why the flicker on the light isn't showing.
Ahh yeah, SetLightVisible! Sorry about that. I'm in Bali, can't look at Engine Scripts P: hehe
(06-22-2016, 03:21 AM)Romulator Wrote: [ -> ]Ahh yeah, SetLightVisible! Sorry about that. I'm in Bali, can't look at Engine Scripts P: hehe
Well, none of them worked.
I believe that script was written with the assumption that the default state of the light is ON, but in your case it's off, and the flicker turns it on instead. Basically this script is manually creating a flicker effect, but you need to set the ON state to be your lit version, maybe even max. The script will turn it off in the beginning, then flash it once every 41 seconds.
(06-22-2016, 11:55 AM)Mudbill Wrote: [ -> ]I believe that script was written with the assumption that the default state of the light is ON, but in your case it's off, and the flicker turns it on instead. Basically this script is manually creating a flicker effect, but you need to set the ON state to be your lit version, maybe even max. The script will turn it off in the beginning, then flash it once every 41 seconds.

When I tried it My Boxlight was active so i dont think this would be the issue.
But what is the color of the boxlight?
I have thunders like that in my mod The Raven if you wanna check.
(06-22-2016, 02:58 PM)Mudbill Wrote: [ -> ]But what is the color of the boxlight?

Diffuse color is black (0, 0, 0, 0)
Off color is gray(0.2, 0.2, 0.2, 0.2)
Pages: 1 2