
07-13-2011, 05:47 PM
|
Newcomer
|
|
Join Date: Nov 2010
Posts: 1
|
|
An Array of Ships, Each With An Array of Weapons
Hello, so ill keep it brief. I have a program where automated ai ships with vector graphics shoot aimed bullets, seeking missiles, and laid bombs with exploding particles when gravity sucks them in. I am hopefully going to be able to create an array of ships, each with an array of each weapon. So Ships(intShipNumber).Bullet(intBulletNumber) would allow each ship of say, 100, be able to shoot its own array of bullets. The Missiles and Bombs would be the same way, and each ship can have more than one bullet, rocket, or bomb on screen at once.
Public Type Ship
Bullets(5) As Bullet
Rockets(3) As Rocket
Bombs(2) As Bomb
Etc...
End Type
Global Ships(100) As Ship
Public Type Bullet
X as integer
Y as integer
Etc...
End Type
Etc...
So each of the 100 ships would have 5 bullets to cycle through.. I am wondering if this is even a correct method of trying to accomplish this?
|
|