Frictional Games Forum (read-only)
Thunder light problem - 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: Thunder light problem (/thread-16780.html)

Pages: 1 2


Thunder light problem - FlawlessHappiness - 07-06-2012

Yea so i thought thunder would make a nice atmosphere.

The sound works fine, but 4 seconds before you hear the thunder sound i want a light to strike, blinding the player in 2 seconds..
Im using the function:

StartEffectFlash(0.1, 1, 5);


This just doesnt work.. No mater how i change the FadeIn or the FadeOut then it uses the same amount of time, and the FadeIn is too long.. I wanted the screen to get completely white instantly.. it takes about 10 seconds... What is wrong?


RE: Thunder light problem - Your Computer - 07-06-2012

The code you provided should only take 5.1 seconds. We'll need to see more if it is lasting 10 seconds.


RE: Thunder light problem - FlawlessHappiness - 07-06-2012

Heres my script:


void OnStart()
{

AddTimer("thunder_light_start", 10, "thunder_light_start");


}


///TIMERS

void thunder_light_start(string &in asTimer)
{
AddDebugMessage("Starting Thunder", false);
StartEffectFlash(0, 1, 5);
AddTimer("thunder_sound_start", 4, "thunder_sound_start");
}

void thunder_sound_start(string &in asTimer)
{
PlaySoundAtEntity("thunder_sound", "general_thunder", "Player", 0.5f, false);
AddTimer("thunder_light_start", 20, "thunder_light_start");
}

And the video:

http://www.youtube.com/watch?v=g-10IeeTraI&feature=youtu.be


RE: Thunder light problem - Your Computer - 07-06-2012

Use this:
Code:
StartEffectFlash(0.01, 0, 0.01);

Apparently, the middle value seems to add to the time more than expected.


RE: Thunder light problem - FlawlessHappiness - 07-06-2012

But the middle value is how white the screen should go...


RE: Thunder light problem - Your Computer - 07-06-2012

(07-06-2012, 05:57 PM)beecake Wrote: But the middle value is how white the screen should go...

The wiki isn't always correct in its description.


RE: Thunder light problem - FlawlessHappiness - 07-06-2012

Hm... no.. I tried using 0 but it still uses a long time to fade in..


RE: Thunder light problem - Adny - 07-06-2012

Why not just try to simulate lightning the same way it is done in the original game using sound fx and the FadeLightTo function? It would be a lot easier and probably look better.


RE: Thunder light problem - FlawlessHappiness - 07-06-2012

yea maybe... i will try that Wink Thank you


RE: Thunder light problem - Your Computer - 07-06-2012

You know, there's a reason why i also modified the first and third argument in the code i provided.