scripting help plz.

im trying to make and encreadibly basic rts simular to dune200, galatic civilisations ect ect so for a camera i have made the folowing code to let it move arround the screen…

using UnityEngine;
using System.Collections;

public class Camera : MonoBehaviour {

** public float cameraSpeed;**
** // Update is called once per frame**
** void Update ()**

** {**
__ float amtToMove = Input.GetAxisRaw (“Horizontal”)* cameraSpeed Time.deltaTime; // a value that allows to move a distance over 1 sec__
** //.GetAxis gives a smooth movement Raw gives a snapping feel like old arcade games
*
__ transform.Translate(Vector3.right * amtToMove);__

__ float amtToMove1 = Input.GetAxisRaw (“Vertical”)* cameraSpeed Time.deltaTime; // a value that allows to move a distance over 1 sec__
** //.GetAxis gives a smooth movement Raw gives a snapping feel like old arcade games
*
__ transform.Translate(Vector3.up * amtToMove1);__

** }**
}

i now need to create some way of allowing the mouse to select other objects on screen and on mouse click allow the object to move to the location selected useing pathfinding?

how would i even beguin to create this and what do i like script to the camera or a seprate script?

Hey man, you should probably watch some tutorial videos or read some stuff to get started. Sounds like you’re missing more basic things than it’d be useful to enumerate/respond to here. I started unity stuff by watching alec’s tutorial series, but maybe there’re better ones that’ve come out since then.

Also, that’s not how you should paste code in here - use the code tags instead.

(on the chance that I’ve misjudged your skill level, have a look at onmousedown ).

Theres also a thread in these forums C&C RTS should find something to do with it. I havent had a chance to look into the source code yet , but i gather its one of the best starting places here for RTS style game machanics.