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.

Newcomers DBPro Corner / how do i fire multiple bullets

Author
Message
bigbrother 2000
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 10th Feb 2004 20:09
hi everyone,

i currently have an object which fires a bullet by position a sphere object the the current position of the other object and moving the object when the spacekey is pressed.

however i would prefer multiple bullets to be fired, therefore i would need to create more spheres, but how will i get them to fire when the space key is pressed, because if they all fire at exactly the same time it will just look like 1 bullet so there needs to be a slight pause before the next is fired?

thanks for your help
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 11th Feb 2004 07:16
there are loads of posts just like this one....search the forum and you will get alot of them, i promise

cheers,
bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 11th Feb 2004 08:46
the logic might be: see if fire key is pressed, flag that it is pressed and fire 1 round, flag stays true until loop exits and comes back around, reset flag, check again for fire key pressed, repeat above - point being you only fire 1 round each loop, not all at once. There are also a ton of other ways to achieve this effect as well

-RUST-
"What the... Mooooooooooo!"
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 11th Feb 2004 10:34 Edited at: 11th Feb 2004 10:35
most bullets are instant so creating a sphere that moves as fast as a bullet will not be seen by the human eye... Heres som pseudo:



Member of Tjald - Targeted Joint Addicted Liberation Diplomacy

I am (currently) 42% addicted to Counter-Strike. What about you?

Login to post a reply

Server time is: 2024-09-21 20:46:40
Your offset time is: 2024-09-21 20:46:40