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
Amnesia Custom story Thunder Doesnt flash
Cibre1337 Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2016
Reputation: 0
#1
Amnesia Custom story Thunder Doesnt flash

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/l8eoxxn8j6...-00-81.png (It's bigger than 500kb)
(This post was last modified: 06-21-2016, 06:23 PM by Cibre1337.)
06-21-2016, 06:21 PM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,576
Threads: 61
Joined: Jan 2013
Reputation: 193
#2
RE: Amnesia Custom story Thunder Doesnt flash

Try
PHP Code: (Select All)
SetLampLit(string &in asEntitybool abLit); 

With use of timers to quickly turn it back off. Something like this should work.

PHP Code: (Select All)
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");


Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 06-22-2016, 12:18 AM by Romulator.)
06-22-2016, 12:17 AM
Find Reply
Mudbill Offline
Posting Freak

Posts: 3,660
Threads: 58
Joined: Apr 2013
Reputation: 169
#3
RE: Amnesia Custom story Thunder Doesnt flash

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.

(This post was last modified: 06-22-2016, 03:00 AM by Mudbill.)
06-22-2016, 03:00 AM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,576
Threads: 61
Joined: Jan 2013
Reputation: 193
#4
RE: Amnesia Custom story Thunder Doesnt flash

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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
06-22-2016, 03:21 AM
Find Reply
Cibre1337 Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2016
Reputation: 0
#5
RE: Amnesia Custom story Thunder Doesnt flash

(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.
(This post was last modified: 06-22-2016, 07:38 AM by Cibre1337.)
06-22-2016, 07:33 AM
Find Reply
Mudbill Offline
Posting Freak

Posts: 3,660
Threads: 58
Joined: Apr 2013
Reputation: 169
#6
RE: Amnesia Custom story Thunder Doesnt flash

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.

06-22-2016, 11:55 AM
Find Reply
Cibre1337 Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2016
Reputation: 0
#7
RE: Amnesia Custom story Thunder Doesnt flash

(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.
06-22-2016, 01:05 PM
Find Reply
Mudbill Offline
Posting Freak

Posts: 3,660
Threads: 58
Joined: Apr 2013
Reputation: 169
#8
RE: Amnesia Custom story Thunder Doesnt flash

But what is the color of the boxlight?

06-22-2016, 02:58 PM
Find Reply
Daemian Offline
Posting Freak

Posts: 1,130
Threads: 42
Joined: Dec 2012
Reputation: 49
#9
RE: Amnesia Custom story Thunder Doesnt flash

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

06-22-2016, 06:24 PM
Find Reply
Cibre1337 Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2016
Reputation: 0
#10
RE: Amnesia Custom story Thunder Doesnt flash

(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)
(This post was last modified: 06-22-2016, 07:09 PM by Cibre1337.)
06-22-2016, 07:08 PM
Find Reply




Users browsing this thread: 1 Guest(s)