Hello guys i just want to Post my script cause im lost now i dont know what the error still cause ive done anything and more but still the same i need some help guys pleasee help me Thankyou Newbie only just need HELP …
ERROR >>> Assets/Acid.js(53,13): BCE0005: Unknown identifier: ‘Lives’.
ERROR >> Assets/Acid.js(55,5): BCE0005: Unknown identifier: ‘RemovalGrime’.
//Acid.js
#pragma strict
var acid:Rigidbody2D;
var speed:float = -3.0;
function Start ()
{
}
function Update ()
{
}
InvokeRepeating("SpawnAcid", 3, 5);
function SpawnAcid()
{
var acidInstance:Rigidbody2D;
acidInstance = Instantiate(acid, Vector3(Random.Range(-8, 8),7,0), Quaternion.Euler(new Vector3(0,0,0)));
acidInstance.name = "Acid(Clone)";
acidInstance.velocity = new Vector2(0, speed);
}
function OnCollisionEnter2D(other:Collision2D)
{
if(other.gameObject.name=="Spongy")
{
Destroy(gameObject);
RemovalAcid();
}
}
var gameObjects : GameObject[];
function RemovalAcid()
{
gameObjects = GameObject.FindGameObjectsWithTag("Acid");
for(var i = 0 ; i < gameObjects.length ; i ++)
Destroy(gameObjects[i]);
}
if (Lives == 0)
{
RemovalGrime();
RemovalAcid();
Time.timeScale = 0;
}