Hurray again! LOL! I fixed the engine bug, where the engine would not turn off after cranking up. You can now toggle the tank's engine on/off with the "e" key, and it won't move until the engine has went through the starting sequence (played entire cranking sound) and begins running.

What was causing this bug was the fact that I was using an external function to toggle the engine and make the entity play the sound. Furthermore, the tank's action has a loop "while(engine_state == 1) {...instructions...}. Once this loop is initiated, you have to give it the instructions again that are outside the loop, if you need them. I hope I make sense. An example of this same phenomena is the bug I was having with camera position. At first, my camera updates code was only given inside the tanks while(1) loop, and not the while(engine_state == 1) loop. So when I cranked the engine, camera updates no longer worked. I fixed that one by adding the same camera update code inside the engine_state loop.

The engine bug was fixed with the same concept, and by making the instructions to toggle the engine, play sounds, etc all inside the tanks action, as opposed to an external/global function. Also, I had to add a wait() instruction of 7 frames above the if(key_e) inside the while(1) loop. The wait is required because if it's not there, the instructions are executed so quickly that it cranks the engine again before you can even get your finger off the button. 7 frames was the shortest wait(7) that would work for me. However, it still wants you to press the key and release in abruptly. If you press it down really slow, the engine just restarts. But I don't see this as a real problem. Just about every professional game I've played behaves the same way.

Now, if I can just solve the physics dilemma of preventing the tank from moving/sliding along its y axis, I'll be pretty much done with the bare basics of this little project. laugh