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 / Making multiple bullets shoot continuously

Author
Message
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 14th Feb 2005 06:15
I've already learned how to shoot(http://forum.thegamecreators.com/?m=forum_view&t=47221&b=7) and I use DBC, but I still don't know how to make multiple bullets on screen at the same time. If anyone can help in any way, please let me know. I've worked with Dark Basic over a year now, but I could never get shooting down.(Then again I haven't looked at many tutorials, they're all a bit confusing.)

www.gameroom.com/blinkcomic
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 14th Feb 2005 10:11
why dont u just make more than one bullet object to shoot out of the gun? i mean load it more than once, or clone it?

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 14th Feb 2005 13:17
I've tried that, and I can't seem to make it work. Here's the code I have so far(no cloning yet)...



www.gameroom.com/blinkcomic
The admiral
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 14th Feb 2005 16:17
Have you tried giving each object a flag for moving?? If its state is flaged to 1 for example then keep moving it and then inc to the next bullet etc. There are plenty of multi bullet code snippets out there so check it out.

[href]www.vapourhost.com/~flyer[/href]
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 15th Feb 2005 12:52
yeah, Im not really sure how to make a flag for cloned objects. Would it be something like:

for n = 10 to 20
shootn
next n

or what? I'm really not sure, I've never used cloned flags before.

www.gameroom.com/blinkcomic
ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 15th Feb 2005 13:17 Edited at: 15th Feb 2005 13:18
I've developed a system a while ago, which seems to work flawlessly.

First, you need an array.



Then, you need a function to create the "particle" on demand.




Then, you need a function to update all of the living particles.




You will most certainly need to modify this code to suit your needs, but it's a start.

BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 16th Feb 2005 10:22
uh...from the looks of things, you use DBP, and particles only function in DBP, but I use DBC, so, I dunno if that will work with my code, but I will use it as a base in any way I can. Thanks for your efforts though!

www.gameroom.com/blinkcomic
TravisP
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location: Behind you, with a knife!
Posted: 16th Feb 2005 10:52
BLink look at the source over and over again and tell me you see a particle command

Note: The above I didn't say, your just crazy.

Not a ripoff of The Twilight Zone
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 16th Feb 2005 11:02
hm, sorry, I thought the whole life time thing only applied to particles. I'll look over the Dark Basic coding language again to figure out what the Object command does.

www.gameroom.com/blinkcomic
TravisP
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location: Behind you, with a knife!
Posted: 16th Feb 2005 11:06
Objects(i) = Objects(i) - 1 : rem Decrement the objects lifetime
You must got confused by the rems. Cuase DB can handle it

Note: The above I didn't say, your just crazy.

Not a ripoff of The Twilight Zone

Login to post a reply

Server time is: 2024-11-27 22:31:20
Your offset time is: 2024-11-27 22:31:20