- Home /
Question by
bpears · Oct 26, 2012 at 09:36 PM ·
flashlightscipting
How to have flashlight out on Game start? Script attached.
How do I make it so this works, but the flashlight is activated at start of game?
var linkedLight : Light;
function Update () {
if(Input.GetKeyDown("f")){
linkedLight.enabled = !linkedLight.enabled;
}
}
function LightOff (){
linkedLight.enabled = false;
}
Comment
Best Answer
Answer by hvilela · Oct 26, 2012 at 11:00 PM
function Start () {
linkedLight.enabled = true;
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Help with pickup script 0 Answers
light switch 4 Answers
I want to turn my flashlight on and off, while still maintaining the flicker effects. 3 Answers
Gui placement help 1 Answer