Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Change flashlight color when object is picked up,

$
0
0
I'm trying to make it so when you pick up a gameobject the spotlight color will change. var lt: Light; var MainCam : GameObject; function Start () { MainCam = GetComponent.(); } function Update () { if (Input.GetKeyUp(KeyCode.E)) lt.color -= Color.blue/ 2.0 * Time.deltaTime; } The code will not work, how can i fix it?,

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>