The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Camera flash script
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#1
Camera flash script

I'm trying to make a script for a camera flash as a lantern - I have it working except for the script. The camera is just a lantern with a spotlight, with its fade in and out set to 0, so its instant. Preferably I'd like to have the lantern switch itself off after 0.1 seconds of being turned on. I've being trying to use a script like this, but its not working as I would expect...

void OnStart()

{
if( !GetLanternActive()==true)
{
AddTimer("", 0.1, "LanternOff");
}

}

void LanternOff(string &in asTimer)
{
SetLanternDisabled(true);
AddTimer("", 5.0, "LanternOn");
}

void LanternOn(string &in asTimer)
{

if( !GetLanternActive()==false)
{
SetLanternDisabled(false);
}

}

I get the feeling it should be really simple, but I'm still terrible at scripting Dodgy
09-08-2013, 02:38 PM
Find


Messages In This Thread
Camera flash script - by JonnyAnomaly - 09-08-2013, 02:38 PM
RE: Camera flash script - by Kreekakon - 09-08-2013, 02:43 PM
RE: Camera flash script - by PutraenusAlivius - 09-08-2013, 02:46 PM
RE: Camera flash script - by JonnyAnomaly - 09-08-2013, 03:18 PM
RE: Camera flash script - by Apfel - 09-08-2013, 04:47 PM
RE: Camera flash script - by JonnyAnomaly - 09-08-2013, 05:44 PM



Users browsing this thread: 1 Guest(s)