PDA

Click to See Complete Forum and Search --> : How do I make an object (spaceship) shoot?


popkorn1
Jan 27th, 2000, 06:32 AM
I'm pretty new to VB and I want to make a simple spaceship game, so how would I go about making the ship shoot a bullet when I press the space bar, and just have it fly towards the top of the screen (like Space Invaders)? Same source code would be great =)


Also, if you can help me out on this too... once the bullet is fired, how do I use collision detection to see if it hit the enemy?

Thanks very much =)

SteveCRM
Jan 27th, 2000, 10:59 AM
Put a timer on your form, in it put
Image1.top = Image1.top - 200
Image1 being your laser, put the timer on false.
In your form's keydown section put
If keycode = vbkeyspace then timer1.enabled = true

Email me a SteveCRM@aol.com and I will send you a copy of a game that I made that is like a space invaders game.

Steve