Results 1 to 2 of 2

Thread: How do I make an object (spaceship) shoot?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    1

    Post

    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 =)

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    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 [email protected] and I will send you a copy of a game that I made that is like a space invaders game.

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width