Frictional Games Forum (read-only)
Amnesia Custom story Thunder Doesnt flash - 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: Hints, help and spoilers (https://www.frictionalgames.com/forum/forum-34.html)
+--- Thread: Amnesia Custom story Thunder Doesnt flash (/thread-50035.html)

Pages: 1 2


Amnesia Custom story Thunder Doesnt flash - Cibre1337 - 06-21-2016

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/l8eoxxn8j6x6z13/LevelEditor_2016-06-21-_15-43-00-81.png (It's bigger than 500kb)


RE: Amnesia Custom story Thunder Doesnt flash - Romulator - 06-22-2016

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");




RE: Amnesia Custom story Thunder Doesnt flash - Mudbill - 06-22-2016

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.


RE: Amnesia Custom story Thunder Doesnt flash - Romulator - 06-22-2016

Ahh yeah, SetLightVisible! Sorry about that. I'm in Bali, can't look at Engine Scripts P: hehe


RE: Amnesia Custom story Thunder Doesnt flash - Cibre1337 - 06-22-2016

(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.


RE: Amnesia Custom story Thunder Doesnt flash - Mudbill - 06-22-2016

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.


RE: Amnesia Custom story Thunder Doesnt flash - Cibre1337 - 06-22-2016

(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.


RE: Amnesia Custom story Thunder Doesnt flash - Mudbill - 06-22-2016

But what is the color of the boxlight?


RE: Amnesia Custom story Thunder Doesnt flash - Daemian - 06-22-2016

I have thunders like that in my mod The Raven if you wanna check.


RE: Amnesia Custom story Thunder Doesnt flash - Cibre1337 - 06-22-2016

(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)