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.

DarkBASIC Discussion / machine gun!

Author
Message
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 10th Oct 2003 03:48
hello people,
can someone tell me how to do a rapid fire machine gun out of this:


‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 10th Oct 2003 08:20 Edited at: 10th Oct 2003 08:26
Yep, try this: [EDIT] I neglected the BulletLife variable... Try Ths:



Not too sure if it works, but if so... there ya go..

Hope I Helped...

Knowladge Belongs To The People...
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 10th Oct 2003 17:56
well, thank u so much for the code but i think there r some bugs, 1rst when i click the mouse only ONCE, a single bullet appears but dosnt move until i click the mouse again, then a second bullet appears and both of them move.
the other bug is that it dosnt shoot more than two bullets, i need a real-rapid-fire machine gun.
but thankx again if u can fix those just notify me!

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 10th Oct 2003 19:59 Edited at: 10th Oct 2003 20:01
Ok... um, i dont want to be writing your game for you... I took the time especially to just help you out here
(I personly have NEVER made a weapon and have never used anything like bullets, so this is all new to me, and im just problem solving)

But here is the fixed up code (Fully commented, so you can understand it):


Hope I Helped...

Knowladge Belongs To The People...
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 14th Oct 2003 01:59
thankx alot mate u helped me out very much, and oh! i did something totally different from ur last code snippet, but thankx, but again i have to ask u one last thing can u show me how to make ammo? like when 30 rounds of bullets are fired, the bullets are stopped and then reload another 30 when i press another key.
thanks for advance

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 14th Oct 2003 03:28
You'd probably want to control that with a variable, or a few... (or maybe just an array...)

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 14th Oct 2003 11:58
ok, this is exactly the same as my second snipet except without the rem's and it has a new if function and a new variable...



Hope I Helped...

Knowladge Belongs To The People...
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 16th Oct 2003 04:38
thanks for ur help JessTicular uve been really helpful!

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 16th Oct 2003 12:03
Anything to help man...

Knowladge Belongs To The People...

Login to post a reply

Server time is: 2025-05-21 14:17:03
Your offset time is: 2025-05-21 14:17:03