Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thunder light problem
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#1
Thunder light problem

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?

Trying is the first step to success.
07-06-2012, 04:08 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Thunder light problem

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

Tutorials: From Noob to Pro
07-06-2012, 04:13 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Thunder light problem

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

Trying is the first step to success.
(This post was last modified: 07-06-2012, 04:31 PM by FlawlessHappiness.)
07-06-2012, 04:27 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Thunder light problem

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

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

Tutorials: From Noob to Pro
07-06-2012, 05:34 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Thunder light problem

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

Trying is the first step to success.
07-06-2012, 05:57 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Thunder light problem

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

Tutorials: From Noob to Pro
07-06-2012, 06:10 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Thunder light problem

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

Trying is the first step to success.
07-06-2012, 06:13 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#8
RE: Thunder light problem

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.

I rate it 3 memes.
07-06-2012, 06:36 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
RE: Thunder light problem

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

Trying is the first step to success.
07-06-2012, 09:03 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#10
RE: Thunder light problem

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

Tutorials: From Noob to Pro
07-06-2012, 09:25 PM
Website Find




Users browsing this thread: 3 Guest(s)