Hi, I am very much new to scripting in Java. I really dont know much but I am trying..I have to make a timed pick up item that can be editable in the inspector so it can move, scale and rotate.
However, I am getting a semi colon is missing error and I have no idea what it means.
error:
UCE0001: ';' expected. Insert a semicolon at the end.
My code is in Java, but if you know Csharp that is okay too. I just need this to work.
var allow translate: boolean = true;
var allow Scale: boolean = true;
var timedSinceStart: float;
var rotate speed: 100;
private var startPOS: float;
private var startscale: vector3;
function start () {
startPOS = transform.position.y;
startScale = transform.localScale;
}
function Update () {
timedSinceStart = Mathf.Ceil(Time.time);
timeDeltaTime = Time.deltaTime;
if (allowmove)
{
transform.position.y = (Mathf.PingPong(Time.time, 1.5)) + startPOS;
}
if (allowRotate)
{
transform.rotate (Vector3.up * Time.deltaTime * rotatespeed );
}
if (allowScale)
{
transform.localScale += new Vector3(0.1F, 0, 0);
}
}
↧