Im making a RTS game like command and conquer generals but when we use the pick screen command to select the destination for the tank lets say, then it gives me the wrong coordinates i know im doing something wrong but what.
ive added the code im using.
function Move_Unit()
if mouseclick()=0 then exitfunction
if mouseclick()=1 and selected_unit=0 then exitfunction
cursorobj=pick object(mousex(),mousey(),1,50000)
pickdistance#=get pick distance()
mx#=get pick vector x() : mz#=get pick vector z()
pick screen mousex(),Mousey(),pickdistance#
AI entity go to position Selected_Unit, mx#+camera position x(), mz#+camera position y()
position object 9000,mx#+camera position x(),0,mz#+camera position y()
endfunction
There can only be one