- Home /
Making a pick up item that is timed, that moves,scales and rotates
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);
}
}
Answer by KdRWaylander · May 26, 2015 at 11:08 AM
Hi,
You need a capital V in this type:
private var startscale: vector3;
→ Vector3
Your answer
Follow this Question
Related Questions
';' expected. Insert a semicolon at the end. I already have a ; 1 Answer
Expecting EOF found '}' (IM SO LOST) 1 Answer
Error Message Coordinates 1 Answer
Getcomponent Javascript error 3 Answers