hi this is ninjafrog00 and i have a scrypt to move and i want to add to it to were my charicter can swind his sword with “A” and block with"S" and just so you know i don’t have a charict charicter all i have is a pare of fowting arms and wen i move i want them to move up and down so um… here is my scrypt it’s a java scrypt see what you can do oh and btw i’m using windows7 just in case that helps.
var speed = 3.0;
var rotateSpeed = 3.0;
private var inited = false;
private var minVelocity : float;
private var maxVelocity : float;
private var randomness : float;
var damping = 5.0;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis (“Horizontal”) * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis (“Vertical”);
controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(CharacterController)