Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Share
Go down
avatar
Moderator
Moderator
Posts : 329
Points : 2204
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Simple light flicker

on Mon Nov 03, 2014 11:03 am
Hi guys Very Happy I made this very simple script of light flicker Very Happy I hope it's useful for someone

Script (Js):
Code:
#pragma strict

var interval : float = 1.0f;
function Start ()
{
 ¬†InvokeRepeating("Toggle", interval, interval);
}

function Update ()
{
light.intensity = Random.Range (0.3f, 5f);
}
function Toggle()
{
 ¬† ¬†gameObject.active = !gameObject.active;
}
Image:


Last edited by developer23 on Tue Jan 27, 2015 12:49 pm; edited 2 times in total
avatar
Moderator
Moderator
Posts : 194
Points : 2021
Rep : 44
Join date : 2013-12-30
View user profile

Re: Simple light flicker

on Mon Nov 03, 2014 11:06 am
Hey developer23, thanks for the share. I'm sure it is going to be useful to someone.

--New Developer
avatar
Moderator
Moderator
Posts : 329
Points : 2204
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Re: Simple light flicker

on Mon Nov 03, 2014 11:24 am
NewDeveloper wrote:Hey developer23, thanks for the share. I'm sure it is going to be useful to someone.

--New Developer
Thank you Very Happy I also added in description the image Very Happy
Back to top
Permissions in this forum:
You cannot reply to topics in this forum