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
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#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


Messages In This Thread
RE: Amnesia Custom story Thunder Doesnt flash - by Romulator - 06-22-2016, 12:17 AM



Users browsing this thread: 1 Guest(s)