Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thunder light problem
Author Message
BeeKayK Online
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #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?

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
07-06-2012 04:08 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
BeeKayK Online
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #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

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
(This post was last modified: 07-06-2012 04:31 PM by BeeKayK.)
07-06-2012 04:27 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
BeeKayK Online
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #5
RE: Thunder light problem
But the middle value is how white the screen should go...

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
07-06-2012 05:57 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
BeeKayK Online
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #7
RE: Thunder light problem
Hm... no.. I tried using 0 but it still uses a long time to fade in..

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
07-06-2012 06:13 PM
Find all posts by this user Quote this message in a reply
Adny Offline
Posting Freak

Posts: 1,754
Joined: Mar 2012
Reputation: 169
Post: #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.

Timorem and Friends are Hungryâ„¢
07-06-2012 06:36 PM
Find all posts by this user Quote this message in a reply
BeeKayK Online
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #9
RE: Thunder light problem
yea maybe... i will try that Wink Thank you

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
07-06-2012 09:03 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)