Hello, looking for help. Keeps telling me its the first line with " var DamageAmount : int 15; "
var DamageAmount : int 15;
var Range : float;
var Falloff : float = 15;
function Update () {
if(Input.GetButtonDown(“Fire1”)) {
var Impact : RaycastHit;
if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), Impact)) {
Range = Impact.distance;
if (Range < Falloff) {
Impact.transform.SendMessage("Down", DamageAmount);
}
}
}
}
Keeps telling me its the first line with " var DamageAmount : int 15; "