Posted: 31st Oct 2003 2:34
here is a snippit for activating a panal for DBC:

+ Code Snippet
`setup
sync on
sync rate 0

`invin
dim invin(1)
invin(1)=0

`make player object
make object cylinder 1,2
color object 1,rgb(0,0,255)
make object collision box 1,-1,-1,-1,1,1,1,0

`make "key"
make object box 2,.7,.7,.7
color object 2,rgb(255,0,0)
make object collision box 2,-.7,-.7,-.7,.7,.7,.7,0

`make "activation panal"
make object plain 3,6,6
make object collision box 1,-3,-3,-1,3,3,1,0

`make matrix 
make matrix 1,40,40,25,25

`start position
position object 1,2,get ground height(1,2,2)+1,2
position object 3,20,get ground height(1,20,20)+1,20
position object 2,20,get ground height(1,20,0)+1,0


`main loop
do

oldx#=object position x(1)
oldz#=object position z(1)
oldy#=get ground height(1,x#,z#)


`backdrop
color backdrop 0

`temp con
if upkey()=1 then move object 1,.4
if downkey()=1 then move object 1,-.4
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+3)
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-3)

`variables
x#=object position x(1)
z#=object position z(1)
y#=get ground height(1,x#,z#)
oby#=object angle y(1)

`col
if object collision(1,3)>0
position object 1,oldx#,oldy#,oldz#
	if spacekey()=1 
		if invin=1
			active=1
		else
			active=0
		endif
	endif
endif
if object collision(1,2)>0
	delete object 2
	invin=1
endif



`change from active to nonactive
if active=1
color object 3,rgb(255,0,0)
else
color object 3,rgb(0,255,0)
endif
			



`camera 
set camera to follow x#,y#,z#,oby#,10,10,3,1
point camera x#,y#,z#


`sync + loop
sync
loop


............do comment, i love to make things better and smaller

Bishop