RTS Adding a Building etc.. Any sugestions?

I am working on a simple rts as a tutoril for myself and cant figure out how to create a way to have a way of adding buildings. Anyone keen to point me the right way : )

You mean how to create data structures for buildings or placing them on map etc… ? could you be more specific please?

Hmmm. I am not very good at unity however, I think you could use a script I found in another thread ( I will try to find it), to find the position of the mouse and then instantiate the building at that point.
I probably dont know.

EDIT

This is the script I found from Ironman for his top down shooter (Very good game).
I think that you can modify it to spawn the building but I do not understand it.

var reference : Collider;

function FixedUpdate () {

var hit : RaycastHit;

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);

if (reference.Raycast (ray, hit, Mathf.Infinity))
{
var lookat = hit.point;
lookat.y = transform.position.y;
transform.LookAt(lookat);
}
}

Sorry if I was no help.

beside instantiation, you should find the slope of the face you have to insert your building. As most probably you will have some restrictions like “Player can not construct a building to a place having a slope more than 40”.Moreover you need to know how large area your building take place as point can be ok but your building can be so large that something can be around that point which will prevent the player to construct a building around that point. So you can create something like availability map for your current map that for examples 0s can be ok for open areas and 1s can be unavailable. For the slope and other stuff you can make calculations by finding the normal of the face the player clicked and another checking with the bounding box of your building if there are enough large space to place your building.

Thanks guys,

I am more worried about placing them on the map, I already had one like lombal, well similar anyway, but I will take what levye said as well and see what I can work out.

Thanks guys, great community