Pages: 1
Topic closed
You will need to create a seperate sprite for each bullet. keeping track of which bullet to fire is the tricky part. I use a local variable in each bullet called status. If the status =1, the bullet is on screen. If the status =0, the bullet is not active. When your main sprite fires, you check the status of the bullet sprites and find one that has a status of zero and make that one fire.
I made it sound more complicated than it is. Check out the game in my signature to see how i did it.
If you have a project started that you need multiple bullets in, give me the link, and i can help you out.
Last edited by the_guardian (2008-07-26 09:57:36)
Offline
i just copy the bullet sprite numerous times, and make each bullet fire .2 seconds after the last one.
Offline
AlanProjects wrote:
i just copy the bullet sprite numerous times, and make each bullet fire .2 seconds after the last one.
I may have misinterpreted Bart9032's question. If what you are gonig for is for all the bullets to fire every time then that would work.
If you want to be able to fire multiple bullets, but be able to control how many shots are fired, you need to have some way of determining which bullets are already active.
Offline
I would do something like this. Make a single bullet sprite then make it move 10 steps, stamp, move 10 steps, stamp, move 10 steps stamp, clear, repeat until touching x, move -20 steps, stamp, move 10 steps stamp, move 10 steps, stamp, clear. Something along those lines will make it look as if there are 3 bullets moving 10 steps each. Thats the complicated approach.
Offline
AlanProjects wrote:
i just copy the bullet sprite numerous times, and make each bullet fire .2 seconds after the last one.
the-guardian wrote:
I may have misinterpreted Bart9032's question. If what you are gonig for is for all the bullets to fire every time then that would work.
If you want to be able to fire multiple bullets, but be able to control how many shots are fired, you need to have some way of determining which bullets are already active.
Thanks for solving my problem guys
Offline
Topic closed
Pages: 1