FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionSlender Like Flashlight Script (Advanced == true);

more_horiz
var lightbulb : Light;
var batterylevel : float = 5000.0;
var batterylower1 : float = 0.1;
var putasbatterylower1 = 0.1;
var onoffsound : AudioClip;


function Update () {
if(!lightbulb.enabled) {
batterylower1 = 0;
}
if(Input.GetButtonDown("Fire1")){
lightbulb.enabled = !lightbulb.enabled;
batterylower1 = putasbatterylower1;
audio.PlayOneShot(onoffsound);
}
batterylevel = batterylevel - batterylower1;
if(batterylevel <- 1) {
lightbulb.enabled = false;
}
}

descriptionRe: Slender Like Flashlight Script (Advanced == true);

more_horiz
Hi im wooden_sword789 but with my 2nd account

descriptionRe: Slender Like Flashlight Script (Advanced == true);

more_horiz
Nice

_________________
FPS

descriptionRe: Slender Like Flashlight Script (Advanced == true);

more_horiz
Thx
Permissions in this forum:
You cannot reply to topics in this forum