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 / need hep with 3rd person shooter (DBPRO)

Author
Message
Krazy Jimmy
20
Years of Service
User Offline
Joined: 29th Apr 2004
Location:
Posted: 30th Apr 2004 06:30
ya well basically in a nutshell ive got everything i need for the game i just dont know how to make the bullet come out of his gun :\
any help would be highly appreciated...
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 30th Apr 2004 22:46 Edited at: 30th Apr 2004 22:47
Be more specific... What have you done? What do you need to have done? Which parts don't work...Post some of your code...



Well... I hope this helps...

Previously known as "Game_Creator". Thou shalt not thwart the way of the dragon. For thou tasteth like chicken.
Krazy Jimmy
20
Years of Service
User Offline
Joined: 29th Apr 2004
Location:
Posted: 1st May 2004 05:49 Edited at: 1st May 2004 05:52
well im using the "basic control over a cube" tutorial and all i need is for a little bullet to come out of him and not from off screen like in FPS'es...i dont care how this is done...and my trial just ran out on DB but i installed my hardcopy of DBPro yay!! finally came...but i cant get that tutorial right now but i can if i look...all i want is for a bullet to come out of a cube...
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 1st May 2004 08:40
Game Kit gave you a pretty good snippet, but let me see if I can break it down a bit for you.

The first thing you want to do is decide how many bullets you want. It can't be infinite, but it can be big. lets say you want 1000 bullets (really absurd) so you create 1000 objects and then hide them.

for a = 3000 to 4000
make object cube a, 5
hide object a
next a

Next you'll want to know what to do with them! First you need a variable so you know what bullet you are on. Then you read for a mouse click, if that happens position the current bullet at the gun, face it in the direction the gun is facing, and show it. Save all this in some arrays.

All you need now is logic! Have your program sort through all the active bullets. First move them then check for collision. If there is a collision, hide that bullet again and kill whatever it hit.

This is a quick and dirty way to do this, and you may run into problems if you shoot something really far away, and then shoot something close, but its the general concept. Have fun!

Think Gad fro Spill Chock!
Krazy Jimmy
20
Years of Service
User Offline
Joined: 29th Apr 2004
Location:
Posted: 1st May 2004 17:19 Edited at: 1st May 2004 17:22
t/y very much...but what is the syntax for making the bullet come out of the cube or placing it inside the cube rather...i can get the movement and shooting its just coming form the wrong place :...all i need is a string to place a bullet ready to be shot inside a cube...

p.s. thank you for the code guys that really helped...but the thing about DarkBASIC is i dont know about placement... i came from a Gamemaker background and we had those room maker things so i never worried..

Login to post a reply

Server time is: 2024-09-22 07:19:44
Your offset time is: 2024-09-22 07:19:44