Frictional Games Forum (read-only)

Full Version: Thunder light problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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?
The code you provided should only take 5.1 seconds. We'll need to see more if it is lasting 10 seconds.
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-10IeeTr...e=youtu.be
Use this:
Code:
StartEffectFlash(0.01, 0, 0.01);

Apparently, the middle value seems to add to the time more than expected.
But the middle value is how white the screen should go...
(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.
Hm... no.. I tried using 0 but it still uses a long time to fade in..
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.
yea maybe... i will try that Wink Thank you
You know, there's a reason why i also modified the first and third argument in the code i provided.
Pages: 1 2