Hey BatVink,
Thank you for the fast reply!
The code doesn't really work i mean the object now doesn't appear on the screen or if it does, it goes from up to down very fast and then disappears.
Thank You again!
Here is the code for an editor prototype that i am testing the codes.
global obj = 2
global camspeed = 10
startblue "RT","4e2d"
autocam off
disable escapekey
position camera 0,50,244,55
rotate camera 90,0,0
make object plane 555, 100000, 100000 : xrotate object 555, 90
make object box 1,145,145,145
position object 1,camera position x(0), 5, camera position z(0) + 155
objm = 2
valup = 0
risevalmouse = 3000
placeobj = 2
`load object "hut6.x",placeobj
posobj = 5
wll = 11
`load object "wall_ALL_a_E.X",wll
do
if object exist(1) = 1
pick screen mousex(),mousey(), 1000
new_xp# = get pick vector x() + camera position x(0)
new_zp# = get pick vector z() + camera position z(0)
if abs(new_xp# - old_xp#) > 55 then old_xp# = new_xp#
if abs(new_zp# - old_zp#) > 55 then old_zp# = new_zp#
position object 1,old_xp#,object position y(1),old_zp#
endif
remstart
poswll = poswll + 1
if poswll = 2
inc wll
load object "wall_ALL_a_E.X",wll
endif
else
poswll = 0
endif
remend
remstart
if object exist(1) = 1
pick screen mousex(),mousey(), 1000
xp# = get pick vector x() + camera position x(0)
zp# = get pick vector z() + camera position z(0)
position object obj,xp#,object position y(obj),zp#
endif
remend
if mouseclick() = 1
inc posobj
make object box posobj,145,145,145
ENDIF
if object exist(posobj) = 1
position object posobj, object position x(1) , 5, object position z(1)
endif
if keystate(30) = 1
stepcaml = stepcaml + 1
if stepcaml = 2
if thritytwogridchecked = 1
move camera left 0,32
else
if thritytwogridchecked = 0
move camera left 0,35
endif
endif
endif
else
if keystate(30) = 0
stepcaml = 0
endif
endif
if keystate(32) = 1
stepcamr = stepcamr + 1
if stepcamr = 2
if thritytwogridchecked = 1
move camera right 0,32
else
if thritytwogridchecked = 0
move camera right 0,35
endif
endif
endif
else
if keystate(32) = 0
stepcamr = 0
endif
endif
if keystate(17) = 1
stepcamu = stepcamu + 1
if stepcamu = 2
if thritytwogridchecked = 1
move camera up 0,32
else
if thritytwogridchecked = 0
move camera up 0,35
endif
endif
endif
else
if keystate(17) = 0
stepcamu = 0
endif
endif
if keystate(31) = 1
stepcamd = stepcamd + 1
if stepcamd = 2
if thritytwogridchecked = 1
move camera down 0,32
else
if thritytwogridchecked = 0
move camera down 0,35
endif
endif
endif
else
if keystate(31) = 0
stepcamd = 0
endif
endif
remstart
position object 1, camera position x(0), 5, camera position z(0)
remend
remstart
if mouseclick() = 1
place = place + 1
if place = 2
position object placeobj,object position x(placeobj),object position y(placeobj),object position z(placeobj)
inc placeobj
load object "hut6.x",placeobj
ENDIF
ENDIF
if mouseclick() = 0
place = 0
ENDIF
text 333,333, str$(risevalmouse)
hide mouse
pick screen mousex(),mousey(), risevalmouse `risevalmouse
x# = get pick vector x() + camera position x(0)
z# = get pick vector z() + camera position z(0)
position object placeobj,x#,object position y(placeobj),z#
text 25,25, str$(object position x(1))
text 35,35, str$(object position y(1))
text 45,45, str$(object position z(1))
remend
`position object 1,camera position x(0),5,camera position z(0)
remstart
`Keyboard Manipulation
if keystate (17) = 1
x = camera position x (0)
y = camera position y (0)
z = camera position z (0)
`z = z + 10
z = z + camspeed
position camera 0,x,y,z
ENDIF
if keystate (30) = 1
x = camera position x (0)
y = camera position y (0)
z = camera position z (0)
`x=x-10
x=x-camspeed
position camera 0,x,y,z
ENDIF
if keystate (31) = 1
x = camera position x (0)
y = camera position y (0)
z = camera position z (0)
`z = z - 10
z = z - camspeed
position camera 0,x,y,z
ENDIF
if keystate (32) = 1
x = camera position x (0)
y = camera position y (0)
z = camera position z (0)
`x=x+10
x=x+camspeed
position camera 0,x,y,z
ENDIF
remend
if keystate (16) = 1
inc risevalmouse
x = camera position x (0)
y = camera position y (0)
z = camera position z (0)
`y=y+10
y=y+camspeed
position camera 0,x,y,z
ENDIF
if keystate (18) = 1
dec risevalmouse
x = camera position x (0)
y = camera position y (0)
z = camera position z (0)
`y=y-10
y=y-camspeed
position camera 0,x,y,z
ENDIF
`Changing Camera Speed
mz = mousemovez()
if mz<0
dec camspeed
ENDIF
if mz>0
inc camspeed
ENDIF
text 20,100,"Scrolling Speed: " + str$(camspeed)
sync
loop
Rims Flames