Posted: 6th Jan 2003 11:47
hi.
im haveing trouble firing multiple bullets. like a machine gun effect using spheres as the bullets. can someone please help me

thanx
Al
Posted: 6th Jan 2003 16:06
`100 machine gun bullets
`When you fire bullets you will be firing in rounds of 100
`when you reach the end of the round all the bullets will be
`re-used so no moe than 100 bullets are required
`when they hit the target they will be repositioned so that they
`make bullets
for t=1 to 100
make object sphere t,5
next t
`make ammo variable
do
if mouseclick=1 and wayt=0 then move object ammo#,
loop
Posted: 6th Jan 2003 16:08
AHHHHHHHH
HALT!!!
ignor that last post
I accidently pressed return half way through
wait a moment and i'll post the correct one
Posted: 6th Jan 2003 16:15
sorry, on second thoughts what i thought of would not work
(sorry!)
Posted: 11th Jan 2003 1:44
I am using animation tests to regulate my breech rounds.
Basically if the gun is performing an animation it wont fire a bullet.
I tried using stacked arrays so that I could add as many rounds to a gmae as possible but I dont think they are working properly.
Posted: 11th Jan 2003 8:27
Maybe this:

+ Code Snippet
REM We'll use objects 100 - 199 and create an array for
REM for bullet stats
DIM BulletStat(99)
CurrentBullet as Integer

for i = 100 to 199
  rem pretend we have a bullet object we can load (change to spheres)
  load object "bullet.x",i
next i

Rem now we got 100 bullets and their models!

Rem now simply add your firing conditions (press trigger, recoil, etc...)
REM and then use

if firing = 1
  BulletStat(curbullet) = 1
  inc curbullet
endif

REM of course, in your loop, you need a bullet control like:
for i = 100 to 199
  rem get status of this index's bullet
  if BulletStat(i-100) = 1
    show object i
    move object i,10
  else
    hide object i
  endif
next i


This was completely off the top of my head, but I hope it helps. It probably wont run, but at least you might get an idea from it. I've used similar code in QBasic games. It should be the same idea though.
Posted: 27th Jan 2003 6:23
use alopp do until buton for firing is realsed or ammo runs out,