its for placing buildings right??? its good code what it needs is
if mouseclick() place the building at that position so the mouse can't control it any more.
rem *****************************
rem * Fake 2D to 3D Positioning *
rem *****************************
rem * By Hamish McHaggis *
rem * DATE: 5/5/2003 *
rem *****************************
rem Program values
drag_spd#=4.0
building_num=1
cam_x#=5000
cam_z#=5000
cam_y#=1000
x#=5000
y#=50
z#=6000
rem Setup
autocam off
sync on
rem Make environment
set camera range 1,10000
make matrix 1,10000,10000,25,25
make object cube 1,200
position camera cam_x#,cam_y#,cam_z#
rotate camera 65,345,0
rem Main loop
do
if placed=0
rem Store amount that mouse has moved
x_step#=x_step#+mousemovex()*drag_spd#*cos(345)-mousemovey()*drag_spd#*sin(345)
z_step#=z_step#-mousemovex()*drag_spd#*sin(345)-mousemovey()*drag_spd#*cos(345)
rem If the mouse has moved more than 100 units in one direction, move the cube
if x_step#>100
x#=x#+100
x_step#=0
else
if x_step#<-100
x#=x#-100
x_step#=0
endif
endif
if z_step#>100
z#=z#+100
z_step#=0
else
if z_step#<-100
z#=z#-100
z_step#=0
endif
endif
rem Position cube
position object building_num,x#,y#,z#
rem Position mouse over cube
position mouse object screen x(building_num),object screen y(building_num)
endif
if mouseclick()=1
placed=1
endif
sync
loop
like this
ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL
[email protected] to work on the new Star Strike project!!!