loop
color backdrop 0,1
set ambient light 100
LOAD OBJECT "alien.x",3
load object "bathroom.x",1
position object 1,0,-250,0
set object speed 3,40
loop object 3,0,23
scale object 3,6000,6000,6000
YROTATE OBJECT 3,180 : FIX OBJECT PIVOT 3
position object 3,0,0,0
Do
` Store Object angle
AngleY# = object angle Y(3)
` Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,AngleY#,20)
ZTest# = Newzvalue(Z#,AngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move object 3,12
Endif
Endif
If Leftkey()=1 then Yrotate object 3,Wrapvalue(AngleY#-5)
If Rightkey()=1 then Yrotate object 3,Wrapvalue(AngleY#+5)
X# = Object position x(3)
Z# = Object position z(3)
Position object 3,X#,Y#+12.5,Z#
CameraZ# = Newzvalue(Z#,AngleY#-180,100)
CameraX# = Newxvalue(X#,AngleY#-180,100)
Position camera CameraX#,CameraY#+50,CameraZ#
Point camera X#,Y#+25,Z#
` Refresh Screen
Sync
Loop
well here is my main loop work in progress guys. hope you can help me incorporate that code i alrady tried to change the angly# cause they would have conflicted but it did not make it work properly
A child's dream never dies.