selecting an object

How can I select an object by clicking on it. I want to click on an object so I only control that object, then when I click on another object I can only control the one I just clicked on.

I assume you mean in-game,

make an int property called control

for each object make a property sensor, each with a different number and property = control

hook that sensor onto all of your and controllers

then make it so when you click on an object, your control property changes to coorispond with that objects number