Hi everyone. I hope those of you with a greater understanding of math than I have can help me with this issue.
I have a top-down space shooter type game. I'm using custom physics-based movement to propel the ship. What I'm struggling with is the following:
I have two max speeds set for my ship, VarTotalMaxSpeed and VarAfterburnerMaxSpeed, set to 120 and 240 respectively. I've got all the motion working quite well except for one little snag: While I want to limit the afterburner usage with limited fuel (not implemented in my example file), I want my player to always have the ability to manoeuvre with the basic thrusters, but due to the way I've set up my events, when the player is going between the speeds 120 and 240, they can only use their afterburners.
Essentially what I want is a way for the player to use the regular thrusters at that speed, but only to slow down the ship, by flipping it in the opposite direction of travel and pressing the up button. Activating the regular thrusters would have no effect if the player continued in the same direction.
capx
What I'd like to accomplish:
<img src="https://dl.dropbox.com/u/14522925/ExampleImage.jpg" border="0">
Thanks in advance!