J
James7285
Guest
Hello,
Another question relating to my rocket game and the speed.
When you press up on the keyboard the rocket flies upwards and the speed of the rocket is displayed in the top left corner. When you let go of the up arrow or run out of fuel gravity kicks in, the rocket loses speed and begins to fall back to earth.
The problem I'm having is that as the rocket falls the speed drops to 0, but then starts going back up again as obviously the rocket is picking up speed going downwards.
I want it so that if the rocket is falling and the speed hits 0, it stays on 0. Then if the thrust kicks back in obviously it will rise back up again. At the moment to display the speed I am using the following:
mph = round(obj_rocket.speed * 20)
draw_text(x, y + 30, "Speed: " + string(mph) + "mph ")
Thanks for the help.
James
Another question relating to my rocket game and the speed.
When you press up on the keyboard the rocket flies upwards and the speed of the rocket is displayed in the top left corner. When you let go of the up arrow or run out of fuel gravity kicks in, the rocket loses speed and begins to fall back to earth.
The problem I'm having is that as the rocket falls the speed drops to 0, but then starts going back up again as obviously the rocket is picking up speed going downwards.
I want it so that if the rocket is falling and the speed hits 0, it stays on 0. Then if the thrust kicks back in obviously it will rise back up again. At the moment to display the speed I am using the following:
mph = round(obj_rocket.speed * 20)
draw_text(x, y + 30, "Speed: " + string(mph) + "mph ")
Thanks for the help.
James