Whats the script for basic Character movement?

I’ve had Unity for just over a month now, I pretty much know all about importing objects, the problems that have arose are the programming. If any of you would care to help me with the code for basic movements such as:

-Strafe Forward
-Strafe Right
-Strafe Left
-Strafe Backwards

I’m not looking for complicated codes, All I really need is the script to for those basic movements.

(I tried looking up the codes, but when I attached the scripts to my object, it sayed that there were compiler errors with my script.)

Have you tried the Character Controller included with Standart Assets? In Unity, click the Assets menu, Import Package > Character Controller.

var speed = 3.0;

var rotateSpeed = 3.0;

function Update ()

{ var controller : CharacterController = GetComponent(CharacterControll­er); //Rotate around y - axis transform.Rotate(0, Input.GetAxis (“Horizontal”) * rotateSpeed, 0); //Move forward / backward var forward = transform.TransformDirection(V­ector3.forward); var curSpeed = speed * Input.GetAxis (“Vertical”); controller.SimpleMove(forward * curSpeed); }

@script RequireComponent(CharacterCont­roller)