That's an idea
....
But i have a question...... how do I make it so the box's length is = to the current variable color??
Because if I used something like
it would be creating about 10 boxes every second......
But if you could help me with that then I could have sliders
.
I'm currently working on a car script.
If you want the original search for "realistic car" and the second post and onwards have the code I used as a base
.
But this is my current code:
REM Project: Car
REM Created: 20/05/2007 16:18:33
REM
REM ***** Main Source File *****
REM
REM Project: smart drivin'
REM Created: 02/03/2007 19:59:55
REM
REM ***** Main Source File *****
REM
sync on
backdrop on
sync rate 60
speed#=0.0
camera#=20
camera2#=0
load object "mediacar.x",1
load object "medialand.x",2
scale object 2,10000,10000,10000
make matrix 1,9999,9999,100,100
position matrix 1,-5000,0,-5000
do
position camera Object Position X(1)+camera2#,Object Position Y(1)+camera#,Object Position Z(1)-20
Point camera Object Position X(1),Object Position Y(1),Object Position Z(1)
set cursor 0,0
print "speed#=",speed#
if upkey()=1 then camera#=camera#+0.5
if downkey()=1 then camera#=camera#-0.5
if rightkey()=1 then camera2#=camera2#+1
if leftkey()=1 then camera2#=camera2#-1
if keystate(17)=1 and speed#<3.0 then speed#=speed#+0.05
if keystate(17)=0 and speed#>=0 then speed#=speed#-0.01
if keystate(17)=0 and speed#>=0 and spacekey() then speed#=speed#-0.04
if keystate(17)=0 and spacekey()=1 and speed#<2.0 and speed#>0.3
if keystate(30)=1
dec visangle#,3
endif
if keystate(32)=1
inc visangle#,3
endif
else
if keystate(30)=1 and speed#>2.0
dec visangle#,2
endif
if keystate(32)=1 and speed#>2.0
inc visangle#,2
endif
if keystate(30)=1 and speed#>1.5 and speed#<2.0
dec visangle#,1.5
endif
if keystate(32)=1 and speed#>1.5 and speed#<2.0
inc visangle#,1.5
endif
if keystate(30)=1 and speed#>1.0 and speed#<1.5
dec visangle#,1.0
endif
if keystate(32)=1 and speed#>1.0 and speed#<1.5
inc visangle#,1.0
endif
if keystate(30)=1 and speed#>0.3 and speed#<1.0
dec visangle#,1
endif
if keystate(32)=1 and speed#>0.3 and speed#<1.0
inc visangle#,1
endif
endif
physangle#=curvevalue(visangle#,physangle#,75)
yrotate object 1,physangle#
move object 1,speed#
yrotate object 1,visangle#
sync
loop
land.x I'm just using as it is a better gauge of speed than a matrix
and car.x is a simple rectangle with rounded edges
.
This is the code I based that off:
REM Created: 02/03/2007 19:59:55
REM
REM ***** Main Source File *****
REM
sync on
backdrop on
sync rate 60
speed#=0.0
rem load object "smartcar.x",1
make object cube 1,100
do
set cursor 0,0
print "speed#=",speed#
if upkey()=1 and speed#<6.0 then speed#=speed#+0.3
if downkey()=1 and speed#>-6.0 then speed#=speed#-0.3
if speed#>0.0 and speed#<0.2 then speed#=0.0
if speed#<0.0 and speed#>-0.2 then speed#=0.0
if leftkey()=1 then dec visangle#
if rightkey()=1 then inc visangle#
physangle#=curvevalue(visangle#,physangle#,75)
yrotate object 1,physangle#
move object 1,speed#
yrotate object 1,visangle#
sync
loop
E.D.