ok, thanks, now its following.
the problem now is if you hit the z key, nothing happens.
if you hit the z key, the camera should follow the specified object
sync on : sync rate 60
autocam off
Dim __ObjTaken(0) as boolean ` Global array
Dim __CamTaken(0) as boolean ` Global array
global objnum
objnum = FreeObj()
make object cube objnum,1
objnum = FreeObj()
make object sphere objnum,1
position object objnum,4,1,4
oldcamnum = FreeCam()
global camnum=1
do
if camnum=1
setcamtofollow(1)
else
if keystate(44)
if camnum>1
setcamtofollow(camnum)
endif
endif
endif
sync
loop
function setcamtofollow(obj as integer)
set camera to follow object position x(obj),object position y(obj),object position z(obj),0,9,2,40,1
ENDFUNCTION
function FreeObj()
array insert at bottom __ObjTaken()
count = array count( __ObjTaken() )
if object exist(count) = 0 and __ObjTaken(count) = 0
__ObjTaken(count) = 1
exitfunction count
endif
endfunction 0
function FreeCam()
array insert at bottom __CamTaken()
count = array count( __CamTaken() )
if camera exist(count) = 0 and __CamTaken(count) = 0
__CamTaken(count) = 1
exitfunction count
endif
endfunction 0
CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/