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 / checking to see if bullets hit something.

Author
Message
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 6th May 2004 02:47
Hi, I took a little break from DBC but Im back! and need some help already. I have decided to make a little "beach head" type game, were enemys slowly advance toward you and you must mow them down with your fixed machine gun. I am using the following bullet code



Ok so I got the shooting down, but how do I check to see if those bullets are hitting something, and if so, do something like place a small gray fading cube to simulate a cheap smoke effect, or better yet check to see if the bullet hit a soldier so that I can load a death animation?

Also I am quite confused on how to edit that code so that I can make it more like a FPS, and have the "gun" move according to the movement of the mouse, and fire when I click the mouse.

Well thats alot of stuff to ask for, but yall are nice guys right?

P4 3.2Ghz/Alienware area 51/radeon 9800 pro 256mb/sound blaster audigy 2/5.1 surround sound speakers.
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 6th May 2004 05:27 Edited at: 6th May 2004 05:29
Hi. Here is some mouse control.
Later.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 7th May 2004 01:10
Thanks alot, but How can I change it so that the "gun" can move up and down and all around lol with the mouse? right now it can only move right of left. And my first quesion still remains, How do I check to see if each of those bullets are connecting with something so I can performe an action?

Thanks!

P4 3.2Ghz/Alienware area 51/radeon 9800 pro 256mb/sound blaster audigy 2/5.1 surround sound speakers.
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 7th May 2004 17:39
ok, give me a while.

DBC V1.08 (V1.13 in the post!)
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 7th May 2004 19:03
This is what I have so far. I will continue later.

DBC V1.08 (V1.13 in the post!)
BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 7th May 2004 19:20 Edited at: 7th May 2004 19:21
For Fps code, check out the monster hunt 3d turtorial.

[href] http://developer.thegamecreators.com/?f=t01/3d_tutorial_15 [/href]

It has mouse control, shooting, bullets hitting, Generic AI, etc.
Goodluck

Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 8th May 2004 08:03
You should do that.

Team Aura
Guitarman
21
Years of Service
User Offline
Joined: 31st Jan 2004
Location:
Posted: 13th May 2004 20:59
2 options:
1) use the object collisioin() command
2) use the distance fromula and calculate the distance between the bullet and the object. this way, you can actually see which limbs are hit instead of the entire object

Login to post a reply

Server time is: 2025-05-23 22:49:26
Your offset time is: 2025-05-23 22:49:26