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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia Custom story Thunder Doesnt flash
Author Message
Cibre1337 Offline
Junior Member

Posts: 5
Joined: Jun 2016
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Romulator Offline
G'day mate! :3

Posts: 3,505
Joined: Jan 2013
Reputation: 191
Post: #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#4942
[Image: 8f5d099c7b.png]
(This post was last modified: 06-22-2016 12:18 AM by Romulator.)
06-22-2016 12:17 AM
Find all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,576
Joined: Apr 2013
Reputation: 168
Post: #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 all posts by this user Quote this message in a reply
Romulator Offline
G'day mate! :3

Posts: 3,505
Joined: Jan 2013
Reputation: 191
Post: #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#4942
[Image: 8f5d099c7b.png]
06-22-2016 03:21 AM
Find all posts by this user Quote this message in a reply
Cibre1337 Offline
Junior Member

Posts: 5
Joined: Jun 2016
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,576
Joined: Apr 2013
Reputation: 168
Post: #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 all posts by this user Quote this message in a reply
Cibre1337 Offline
Junior Member

Posts: 5
Joined: Jun 2016
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,576
Joined: Apr 2013
Reputation: 168
Post: #8
RE: Amnesia Custom story Thunder Doesnt flash

But what is the color of the boxlight?

06-22-2016 02:58 PM
Find all posts by this user Quote this message in a reply
Daemian Offline
Posting Freak

Posts: 1,130
Joined: Dec 2012
Reputation: 49
Post: #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 all posts by this user Quote this message in a reply
Cibre1337 Offline
Junior Member

Posts: 5
Joined: Jun 2016
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




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