Ok in my fps game i want it so that way when my player curser goes over a enemy the curser will change to the color green. If it hovers over a enemy it will turn red letting your know to kill that player. And when your shooting and the bullet hits the target the curser will change from its orginal start to a X letting you know you are hitting the target!
Here is my idea for the script i would use for changing curser colors.
private var N_curser = true;
private var R_curser = false;
private var G_cureser = false;
function Awake ()
{
N_curser.enabled = true;
R_curser.enabled = false;
G_curser.enabled = false;
}
function OnMouseEnter ()
{
if ( gameObject.tag == "enemy" )
{
N_curser.enabled = false;
R_curser.enabled = true;
G_curser.enabled = false;
}
else if ( gameObject.tag == "friend" )
{
N_curser.enabled = false;
R_curser.enabled = false;
G_curser.enabled = true;
}
}
function OnMouseExit ()
{
N_curser.enabled = true;
R_curser.enabled = false;
G_curser.enabled = false;
}
I then got no clue on how to make the curser change its shape when you hit the target but i probably can do it if i wasnt hitting it though. Would the script above work?