Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Multiple bullet firing

Author
Message
btecbuddies
22
Years of Service
User Offline
Joined: 21st Oct 2002
Location: United Kingdom
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
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
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

Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
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

Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 6th Jan 2003 16:15
sorry, on second thoughts what i thought of would not work
(sorry!)

the architect
21
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 11th Jan 2003 01: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.

The Wendigo
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 11th Jan 2003 08:27
Maybe this:



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.

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
Archangel
21
Years of Service
User Offline
Joined: 26th Jan 2003
Location:
Posted: 27th Jan 2003 06:23
use alopp do until buton for firing is realsed or ammo runs out,

Login to post a reply

Server time is: 2024-11-24 08:01:42
Your offset time is: 2024-11-24 08:01:42