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.

Author
Message
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 6th Jan 2006 03:23
ok i know there are a million post about this so dont flame me ok.
i have a source code that i am goin to put up so can someone put the code in my source code then i will study it.





thanks ahead.

ATI mobility radeon X600 graphics card
AMD 64 Bit processor
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 6th Jan 2006 03:38
Last time i remember you were banned../..darn..
Oh well, because we all love to do things like this, here you go



Okay end flame start critism




around here.. normal's just a setting on a hair dryer
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 6th Jan 2006 03:49
you know what next time you flame someone look at there name and avatar closer im DBnewbie the one that got banned was DBnewbe look at his post.

ATI mobility radeon X600 graphics card
AMD 64 Bit processor
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 6th Jan 2006 03:58
Wow, im sorry then for treating you soo harshly. But your name is really close to DB Newbie.

But what i say still stands for me.

I would love to help you out, but i would rather see work on your part first before i spend my time and help you out.


around here.. normal's just a setting on a hair dryer
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 6th Jan 2006 12:57
DB newbie is cool, DB Newbe(or 3) is the bad one.

What do you want us to do with the source code? I don't know what you mean...


Hippopotomonstrosesquippedaliophobia-Fear of long words
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 6th Jan 2006 19:34
thank you UFO for backing me up on that one i meen how would i get the gun to shoot a sphere for a bullet when you click the left mouse button and the bullet goes to the center of the screen because that i swere my crosshair will be.

ATI mobility radeon X600 graphics card
AMD 64 Bit processor
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 6th Jan 2006 20:12 Edited at: 6th Jan 2006 20:14
Actually, that depends on the position where it will intersect something.

It's a perspective matter. All lines that are parallel with eachother, will end in one point. Which means that all bullet's you shoot and go in the same direction as you're facing, will eventually reach the crosshair at a distance of infinite.
If you can calculate the distance to the intersection point, you are also able to point the bullet to that intersection point.

You will need some kind of raycasting method for this. I'd suggest Sparky's collision DLL, but this only works with DBC enhanced version. (DLL's are disabled in the non-enhanced version).

A very simple solution would be hiding your bullets and when shooting, position them at the exact same coordinates as the camera. Which means the bullet will <always> point to the crosshairs position.
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 6th Jan 2006 22:26
Sorry DB Newbie for the mix up. But i will try and help you ( I dont give out soruce code but the next best thing should do)

To Shoot a bullet.
First you need to check for left mouse button
--If MouseClick() = 1
Then you need to create a sphere, but you need to make sure that its a sphere that is not in use yet
-x= 10
-while object exist(X) = 1
-inc x
-endwhile
that will find the next avaiable object starting from obj ten.
make the sphere
make object sphere x,.5
Now position that object, at the guns position.
-position object x,posx,posy,posz
(do any aiming of the bullet)
then you need to have the bullet move forward in each loop.

If you need more help, just give sample code. But please show effort in trying to do it your self.


around here.. normal's just a setting on a hair dryer
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 7th Jan 2006 01:21
ok thank you i will try it.

ATI mobility radeon X600 graphics card
AMD 64 Bit processor

Login to post a reply

Server time is: 2025-05-23 04:22:10
Your offset time is: 2025-05-23 04:22:10