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 / detecting objects {dbpro}

Author
Message
Krimzon DestinE
19
Years of Service
User Offline
Joined: 18th Sep 2005
Location:
Posted: 1st Nov 2005 03:12 Edited at: 1st Nov 2005 03:20
i am trying to create bullets in my FPS but when i click the firing button, darkbasic says that the object doesn't exist. I know it does because i created it and i am looking at it right now.

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 1st Nov 2005 07:50
You have a for/next loop saying that b=10 to 999. When you do that and try to use "b" again... "b" is one number higher... so when you try to access the object using object number "b" it equals 1000. Since you don't have an object number 1000 you see the error. You just need to add "b=10" after the for/next loop.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 2nd Nov 2005 08:08
However, using 989 spheres for bullets is a VERY bad idea!

Consider using textured plains that are rotated to face the camera ... and 989? Do you really need that many? I doubt it. Maybe you should try 10-20 and see if that works, if not you could always increase it as needed but 989 is way to many!

Also, consider not using any bullets at all. When you fire your weapon cast a collision ray to see if you have hit the target and then react accordingly. After all you wouldn't see bullets fired from a real gun. Of, course it depends on the game style but not having any bullets objects will certainly increase frame rate.


Great Britain would be Amazing Britain if it wasn't for idiots like you bringing down the average!
Krimzon DestinE
19
Years of Service
User Offline
Joined: 18th Sep 2005
Location:
Posted: 3rd Nov 2005 00:15
Quote: "Also, consider not using any bullets at all"


I think it will be fun to see them flying around. I had it just the limb collision shooting, but i wanna see some bullets flying.

Login to post a reply

Server time is: 2024-09-24 07:24:32
Your offset time is: 2024-09-24 07:24:32