[SOLVED] Values and Displaying Images Not Working
Posted: Sun Apr 18, 2021 8:48 pm
The purpose of this code is to speed up, slow down and show the "Car" based on values. My problem is when I accelerate, it will switch between cars without any issue.
Speed 0 = Car_0
Speed 1 = Car_1
Speed 2 = Car_2
Speed 3 = Car_3
The issue is, the image stays on Car_3 when slowing down. Below is the code I'm using, any suggestions would help.
And if you have any questions, I will do my best to answer them.
Speed 0 = Car_0
Speed 1 = Car_1
Speed 2 = Car_2
Speed 3 = Car_3
The issue is, the image stays on Car_3 when slowing down. Below is the code I'm using, any suggestions would help.
And if you have any questions, I will do my best to answer them.
Code: Select all
label CarSpeedSelect:
"Start Moving" if CarMoveStart == True and CarSpeedValue == 0:
$ CarSpeedValue += 1
call CarImageShow
jump CarSpeedSelect
"Move Faster" if CarSpeedShow == True:
$ CarSpeedValue += 1
call CarImageShow
jump CarSpeedSelect
"Move Slower" if CarSlowShow == True:
$ CarSpeedValue -= 1
call CarImageShow
jump CarSpeedSelect
label CarImageShow:
if VehicleValueTracking == 5:
if CarSpeedValue == 0:
$ CarSpeedShow = False
$ CarSlowShow = False
screen Street
show Car_0
elif CarSpeedValue == 1:
$ CarSpeedShow = True
$ CarSlowShow = False
screen Street
show Car_1
elif CarSpeedValue == 2:
$ CarSpeedShow = True
$ CarSlowShow = True
screen Street
show Car_2
elif CarSpeedValue == 3:
$ CarSpeedShow = False
$ CarSlowShow = True
screen Street
show Car_3
elif VehicleValueTracking == 6:
if CarSpeedValue == 0:
$ CarSpeedShow = False
$ CarSlowShow = False
screen Street
show Bike_0
elif CarSpeedValue == 3:
$ CarSpeedShow = False
$ CarSlowShow = True
screen Street
show Bike_1
elif CarSpeedValue == 2:
$ CarSpeedShow = True
$ CarSlowShow = True
screen Street
show Bike_2
elif CarSpeedValue == 1:
$ CarSpeedShow = True
$ CarSlowShow = False
screen Street
show Bike_3
return