Thread: Allowing theplayer to shoot multi bullets.

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Allowing theplayer to shoot multi bullets.

    I am able to make a man or ship (that you control.) shoot in a direction of you'r choice, but I can't seem to figure out how to make a man or ship shoot more than one shot at a time. Any help?

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    73
    I have a t.v. I can turn it on and off.. but I can't seem to change the channel.... Any help?

    err.. I guess what I'm trying to say is... can u supply some more info as to your exact problem.. I would think making a man or ship have more than one shot at a time would be something rather easy to implement..

  3. #3

    Join Date
    May 2005
    Posts
    1,042
    As mentioned this really is a trivial problem. But, if you show some source code or an attempt to solve the problem I'd gladly give my insight into the various methods I have tried.

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Make a list of objects instead of a single static object.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Umm...


    • Array
    • Linked list
    • Vector


    Code:
    struct point2D
    {
      float x,y;
    };
    
    struct Bullet
    {
      point2D Position;
      point2D Vector;
      float Speed;
    };
    
    #include <vector.h>
    
    std::vector<Bullet> BulletsVector;
    Bullet BulletsArray[100];
    ...
    ...

Popular pages Recent additions subscribe to a feed