UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionSimple light flicker EmptySimple light flicker

more_horiz
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: Simple light flicker Ezgif.com-video-to-gifce2b5

Last edited by developer23 on Tue Jan 27, 2015 12:49 pm; edited 2 times in total

descriptionSimple light flicker EmptyRe: Simple light flicker

more_horiz
Hey developer23, thanks for the share. I'm sure it is going to be useful to someone.

--New Developer

descriptionSimple light flicker EmptyRe: Simple light flicker

more_horiz
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

descriptionSimple light flicker EmptyRe: Simple light flicker

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply