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
SUPER MODERATOR
SUPER MODERATOR
Posts : 279
Points : 2141
Rep : 58
Join date : 2013-12-16
Age : 17
Location : Boise Idaho United States
View user profile

Shootout Light Script

on Sun Apr 06, 2014 5:54 pm
Hello Everyone! Today I have a shootout light script, today its pretty simple
just attach this to the light of your script, make sure it has a collider, assign the light variable and if you have a tagged object named "bullet" it will turn off the light
Smile
have fun!
(this script was made all by me)

Code:
#pragma strict

var lighttoturnoff : Light;
function OnTriggerEnter () {
if(GameObject.FindWithTag("Bullet")) {
lighttoturnoff = GetComponent(Light);
lighttoturnoff.enabled = false;
}
}
Back to top
Permissions in this forum:
You cannot reply to topics in this forum