Tried it, still wont INC or DEC. I can see why my brother is bald now. here's the source, I have a DO LOOP with sync in it, went from a sync rate or 60 to 30 with no change. I'm just sadly lost lol.
`Screen Setup
Sync On
Sync Rate 30
Hide Mouse
`Temp user object
Make Object Cube 1,10
Position Object 1,30,0,20
Color Object 1,RGB(255,255,255)
`Main Loop
DO
`Declare Variables
X#=Object Position X(1)
Y#=Object Position Y(1)
Z#=Object Position Z(1)
Ang#=Object Angle Y(1)
NX#=NewXValue(X#,Ang#,Speed#)
NZ#=NewZValue(Z#,Ang#,Speed#)
`Tire description: First Number is Width,Second number is Sidewall height ratio (width*ratio), third Rnumber is rim diameter.
TireW#=275
TireH#=(275*0.80)
Rim#=22.5
Rearend#=3.08
Gear#=Gear#
Rpm#=Rpm#
Temp1#=Rpm#*Rim#
Temp2#=336*Rearend#
`Gears
IF Speed#<=4.0 THEN Gear#=10.96: `change this to Speed#<=1.2
IF Speed#<=8.0 AND Speed#>=4.1 THEN Gear#=8.18: `Change this to AND Speed#>=1.3
IF Speed#<=14.0 AND Speed#>=8.1 THEN Gear#=6.07
IF Speed#<=20.0 AND Speed#>=14.1 THEN Gear#=4.46
IF Speed#<=28.0 AND Speed#>=20.1 THEN Gear#=3.32
IF Speed#<=35.0 AND Speed#>=28.1 THEN Gear#=2.46
IF Speed#<=45.0 AND Speed#>=35.1 THEN Gear#=1.83
IF Speed#<=55.0 AND Speed#>=45.1 THEN Gear#=1.36
IF Speed#<=65.0 AND Speed#>=55.1 THEN Gear#=1.00
IF Speed#<=75.0 AND Speed#>=65.1 THEN Gear#=0.74
Speed#=Temp1#/Temp2#
IF Gear#=10.96 THEN Gears#=1
IF Gear#=8.18 THEN Gears#=2
IF Gear#=6.07 THEN Gears#=3
IF Gear#=4.46 THEN Gears#=4
IF Gear#=3.32 THEN Gears#=5
IF Gear#=2.46 THEN Gears#=6
IF Gear#=1.83 THEN Gears#=7
IF Gear#=1.36 THEN Gears#=8
IF Gear#=1.00 THEN Gears#=9
IF Gear#=0.74 THEN Gears#=10
`temp coords and speedo
set cursor 5,5
Print "Gear ",Gears#
set cursor 5,20
Print "Speed ",Speed#
set cursor 5,35
Print "RPM ",Rpm#*100
`tires
Set cursor 5,50
Print TireW#," ",TireH#," ",Rim#
`Controls
IF UPKEY()=1
INC Rpm#,0.4
ELSE
DEC Rpm#,0.4
ENDIF
IF DOWNKEY()=1
DEC Rpm#,0.8
ELSE
Rpm#=Rpm#
ENDIF
IF LEFTKEY()=1
NX#=NX#-3
ELSE
NX#=NX#
ENDIF
IF RIGHTKEY()=1
NX#=NX#+3
ELSE
NX#=NX#
ENDIF
IF UPKEY()=0 AND DOWNKEY()=0 AND Rpm#<0.1
Rpm#=0
ELSE
Rpm#=Rpm#
ENDIF
IF Rpm#>60 THEN Rpm# = 60
`Reposition Object
Position Object 1,NX#,Y#,NZ#
`Point Camera
Point Camera NX#,Y#,NZ#
`Call the Screen sync
Sync
Loop
I'm sure I'm doing something horribly stupid, but I can't find it.
Thanks for your suggestion though Hexgear.
Phrozin
***Edit***
Nevermind, got it. had to declare Rpm# as Rpm# (Rpm#=Rpm#)
Now I have another problem, everything is working like I was thinking it would except.
If you look at my code I have Gear# decalring the different trans ratios, but when it actually gets going fast enough to change gears, the max speed stays the same even though gear ratio has been changed. Any idea's?
***Edit2***
Nevermind, forgot to replace 336 with Gear# in the Speed# Calc.
thanks though