Hi, Im Making An Explotion That Makes An Invisble Sphere For 0.1 Seconds And Destroys Everything That Touches It. It Says:
Assets/Standard Assets/Scripts/Game/explotion.js(16,16): BCE0023: No appropriate version of 'UnityEngine.Object.Destroy' for the argument list '(UnityEngine.ControllerColliderHit)' was found.
What is the problem? Code:
function Start () {
print ("Explode!!");
}
function OnControllerColliderHit(hit:ControllerColliderHit)
{
if(hit.gameObject.tag == "Block" || hit.gameObject.tag == "qsand")
{
// dead = true;
// lifeSystem.LIVES--;
// if(lifeSystem.LIVES==0){
// lifeSystem.LIVES = 3;
// print ("Game over");
// }
Destroy(hit);
}
}
Edit: Ok I Changed hit to hit.gameObject But It Does Not Destroy Them! Edit: Now Fixed Ok.