Hello everyone. Well, once again I have encountered a problem. I am creating a small subhunt clone, and I am having trouble with firing multiple depth charges, namely that I don''t know to make them work. So far, the part of the main game loop that relates to this ship looks something like this:
if(Spacebar is down) // fire the torpedo
// set position of the depth charge to that of the ship
Set_Position (ship_pos_x and ship_pos_y);
// set the downward velocity
velocity = 4;
if (Space was pressed)
With the code like this, I can only fire one depth charge. How could I make it so that if space has been pressed more than once, It will draw another depth charge? I know the answer is probably rather simple, but I am rather high on jellybeans, and my brain is not functioning correctly. Thanks, your "wannabe" friend.
Sorry to hear it did''nt work for you. I can''t do much without seeing the code. I assume you where adjusting the view matrix for each missle drawn. But I don''t know how your code was laid out ? I used similar code for multiple pixel explosion algorithms.