use vec_for_screen:

Code:
 

function BuildBuilding()
{
var vecSpawnPos[3];

if(mouse_left)
{
vec_set(vecSpawnPos, vector( mouse_pos.x,mouse_pos.y, camera.z));
vec_for_screen(vecSpawnPos, camera);
ent_create( "witch.MDL", vecSpawnPos, NULL );
}
}


i guess you call this funcion after you clicked on a button, dont you?
so you propably have to you a while loop. :p


nipx