Scripts / Random flashing (broken) light

Author
Message
World Class Multimedia
15
Years of Service
User Offline
Joined: 15th Aug 2008
Playing: Game Development
Posted: 25th Sep 2018 17:15 Edited at: 25th Sep 2018 17:23
My sewers need broken lights that flash at random intervals. Nothing strobe-like, more like a bug zapper (it would be great if I could include sparks as well) or a very broken flourescent light.

How can I achieve this?

Here is the code for flashing lights:



Does Game Guru (lua) have a random number generator? Or would I do this in AGK2 in code?

I need this to work in AGK2 tier 1 as well - since I will be porting all levels to AGK2.

Thank you.

Mike
YOU DREAM IT - WE CREATE IT!

www.atomiccatinteractive.com

For world-class virtual instruments - www.supersynths.com
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 25th Sep 2018 19:39
Yes Lua has the math.random() function.

Google it for full details.
Been there, done that, got all the T-Shirts!
PM
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 25th Sep 2018 23:51
Do you mean something like this?

Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB

Login to post a reply

Server time is: 2024-05-08 20:04:09
Your offset time is: 2024-05-08 20:04:09