For my first "project" in Scratch I thought i'd try and make a duplicate of the popular flash "Copter" game (as found here). The top/bottom blocks are quite basic, as I haven't yet figured out how to make their behaviour more like the original Copter (with different sizes), although I suspect I may have to use costumes in some way.
What I want to try and do next is instead of having a timer (duration flown for), I want to make it display a distance figure. The difference with the copter I have in Scratch is that the speed is settable (different speed settings so whoever uses it can adjust the speed to their machine, and also that speed is always quicker in the Scratch program anyway), so the copter can look like it's flying faster, so simply using a timer is slightly misguiding when you can choose how fast or slow to go.
What exactly would be the best way of doing that? Obviously i'd have to include the current speed variable in some way (maybe manuipulate the timer figure as well?). Another thought I had was simply to just keep adding on the speed figure to a variable, which of course would increase the number faster the higher the speed being played at. I can't seem to figure out the best way to go about it.
Offline
Have a variable "distance" and a loop:
repeat until <some exit condition>
change distance by speed*0.1
wait 0.1 seconds
Offline