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 / On my shooting example thingy, sometimes all the shots fire at once? (DBC)

Author
Message
RandomSKK
20
Years of Service
User Offline
Joined: 15th Sep 2004
Location: Surrey, UK
Posted: 17th Sep 2004 08:15
Heya
I'm making a demo kinda thing, so that I have code for 3d shooting in my games - and so far, it's OK except for one thing - sometimes, all 3 bullets will shoot at once. I can't figure out why, or get them to stop it, and I've been at it for an hour or so - I've tried making loads of delays, making it so that shot 2 only fires when shot one is far away enough from the camera, ect, but none of them seem to work

Right now it's on a delay which has a varible incresing each loop, and when it gets high enough the shot will fire - and sometimes this works, sometimes it still fires all three shots.

No media needed - it's all basic objects and stuff with no textures.

Can anyone help? (I'm using DBC)

Xander
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 22nd Sep 2004 02:33
Try this...it won't fire the next bullet until space is let up...



Or this, which is a timer based delay system...so you can only shoot once a second...



See anything you like?

Xander Moser - Bolt Software - Firewall
RandomSKK
20
Years of Service
User Offline
Joined: 15th Sep 2004
Location: Surrey, UK
Posted: 24th Sep 2004 05:23
nice..
Thanks for the reply.
The both bits of code are usefull, but I particulery like the time delay one.

Again, thanks.

Login to post a reply

Server time is: 2024-11-27 10:47:08
Your offset time is: 2024-11-27 10:47:08