dark donkey
I think that it is understood with this cord.
debug1 (An object1 does not move.)
set text size 16
Rem Load Setup
Set window on
Autocam off
Rem position camera
Position camera 0,0,5,0
Rem load media
'Load object "",1
'Load object "",2
make object cube 1,1 : color object 1,rgb(255,0,0)
make object cylinder 2,50
Rem Position objects
position object 1,0,5,10
position object 2,0,0,50
Rem make Matrix Place-Holder
Make matrix 1,200,200,20,20
position matrix 1,10,0,0
Rem Chase-Cam
Lock object on 1 ` A mistake of how to use.
Set global collision on
Do
Rem player movment
Control camera using arrowkeys 0, 0.1, 0.1
Rem Collision System
Struck=object hit (1,0)
If Struck=0
Print "No objects hit"
else
Print "Object hit!!! ZOMG!"
end
Endif
text 0,100, "object1: "+str$(OBJECT POSITION X(1))+" "+str$(OBJECT POSITION Y(1))+" "+str$(OBJECT POSITION Z(1))
text 0,120, "object2: "+str$(OBJECT POSITION X(2))+" "+str$(OBJECT POSITION Y(2))+" "+str$(OBJECT POSITION Z(2))
text 0,140, "CAMERA: "+str$(CAMERA POSITION X()) +" "+str$(CAMERA POSITION Y()) +" "+str$(CAMERA POSITION Z())
loop
debug2
set text size 16
Rem Load Setup
Set window on
Autocam off
Rem position camera
Position camera 0,0,5,0
Rem load media
'Load object "",1
'Load object "",2
make object cube 1,1 : color object 1,rgb(255,0,0)
make object cylinder 2,50
Rem Position objects
position object 1,0,5,10
position object 2,0,0,50
Rem make Matrix Place-Holder
Make matrix 1,200,200,20,20
position matrix 1,10,0,0
Rem Chase-Cam
` Lock object on 1
Set global collision on
SHOW OBJECT BOUNDS 1
SHOW OBJECT BOUNDS 2
Do
Rem player movment
Control camera using arrowkeys 0, 0.1, 0.1
IF KEYSTATE(17)=1 THEN MOVE OBJECT 1, 0.1
IF KEYSTATE(31)=1 THEN MOVE OBJECT 1,-0.1
IF KEYSTATE(30)=1 THEN MOVE OBJECT LEFT 1, 0.1
IF KEYSTATE(32)=1 THEN MOVE OBJECT RIGHT 1, 0.1
Rem Collision System
Struck=object hit (1,0)
If Struck=0
Print "No objects hit"
else
Print "Object hit!!! ZOMG!"
end
Endif
text 0, 80, "move: WSAD "
text 0,100, "object1: "+str$(OBJECT POSITION X(1))+" "+str$(OBJECT POSITION Y(1))+" "+str$(OBJECT POSITION Z(1))
text 0,120, "object2: "+str$(OBJECT POSITION X(2))+" "+str$(OBJECT POSITION Y(2))+" "+str$(OBJECT POSITION Z(2))
text 0,140, "CAMERA: "+str$(CAMERA POSITION X()) +" "+str$(CAMERA POSITION Y()) +" "+str$(CAMERA POSITION Z())
loop
if TPS_view then
Do
Rem player movment
` Control camera using arrowkeys 0, 0.1, 0.1
SET CAMERA TO FOLLOW OBJECT POSITION X(1),OBJECT POSITION Y(1),OBJECT POSITION Z(1), 0, 5, 1, 2, 1