My favourite task was one referred to as "The Great Race".
The task required us to create a project that allowed 4 race cars to race around a track with various bends using variable speeds to vary the outcome of the race, a timer to time the winning car's speed, and start and reset buttons to initiate the race.
The images shown above show some of the scripts that I made to enable my project to work. The two scripts shown on the left and middle show the scripts that I made for the start and reset buttons. As you can see one starts all the cars scripts to start the race and the other sends all the cars back to their starting positions. The script on the right show how I made my cars run around the track. The car's script uses a simple two colour technique to turn around the track, when the car touches the colour on its left its script will turn right by 25 and if it touches the colour on its right it will turn -20.
I did not encounter any problems during this task as the previous tasks taught me all the techniques that I needed to make this race work correctly.
0 comments:
Post a Comment