Variable Script "movement"

var Move forward : Keyboard;

// replace 'move forward' with what??

// replace 'keyboard' with what??

// i want to know how to make var move forward with value to set its speed

Variable names can't contain spaces. Perhaps you're looking for some kind of very simple movement script, along these lines?

var moveSpeed = 5; var rotateSpeed = 50;

function Update() {

var h = Input.GetAxis("Vertical");
var v = Input.GetAxis("Horizontal");

var moveAmount = h * moveSpeed * Time.deltaTime;
var turnAmount = v * rotateSpeed * Time.deltaTime;

transform.translate(0,0,moveAmount);
transform.rotate(0,turnAmount,0);

}

(allows you to move and rotate the object, with the arrow keys)

You could also just duplicate the FPS Walker script that comes with the standard assets and delete horizontal line! here this is my edited FPS walker script! :

var speed = 6.0;

var jumpSpeed = 8.0; var gravity = 20.0;

private var moveDirection = Vector3.zero; private var grounded : boolean = false;

function FixedUpdate() { if (grounded) { // We are grounded, so recalculate movedirection directly from axes moveDirection = new Vector3(0, 0, Input.GetAxis("Vertical")); moveDirection = transform.TransformDirection(moveDirection); moveDirection *= speed;

    if (Input.GetButton ("Jump")) {
        moveDirection.y = jumpSpeed;
    }
}

// Apply gravity
moveDirection.y -= gravity * Time.deltaTime;

// Move the controller
var controller : CharacterController = GetComponent(CharacterController);
var flags = controller.Move(moveDirection * Time.deltaTime);
grounded = (flags & CollisionFlags.CollidedBelow) != 0;

}

@script RequireComponent(CharacterController)

Hope i helped you!