So i have been working on this balloon script and thanks to the help of people here i have now got my balloon appearing all over the place and have them inflating (getting bigger) over time, but…
It only works on the first instance. Every subsequent clone is already big. Now I expect this is cos I am so silly that i dont know how to combine the code properly so I have the get bigger code on my balloon and the create instance on a game object.
So my question is how do i combine these two code so that each instance grows as it is created. Sorry to be such a dummy but im new but learning fast.
My simple instance code
var projectile : Rigidbody;
function Update () {
if (Input.GetButtonDown("Fire1")) {
var clone : Rigidbody;
clone = Instantiate(projectile, transform.position, transform.rotation);
clone.velocity = transform.TransformDirection (Vector3(0, -1, 0) * 12);
}
}
And my scale script
var bigScale : Vector3 = Vector3(30,30,30);
var myTime : float = 1.0;
function Update ()
{
transform.localScale = Vector3.Lerp(transform.localScale,bigScale,Time.deltaTime * myTime);
}
A little more help we see me through.
Thanks