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 / pls help collision

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 21st Apr 2004 01:51
right one more time can somone pls give me some code that when my bullet object .x comes whithin 20 or whatever of my german man .3ds then my comand ive tried everything it just wont work pls help

i used to be indecisive but now ime not so sure
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 21st Apr 2004 01:56
check out my tutorial and read chapter "Sphere Collision / Distance Check"

http://www.geocities.com/hatesurvivor/MathColl.htm

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 21st Apr 2004 02:06
sniff sniff site temporerally unavailable why now nnnnooooooooo

i used to be indecisive but now ime not so sure
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 21st Apr 2004 02:14
Dont worry, it'll be online after an hour

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 21st Apr 2004 16:44
umm why is this not working pls

i used to be indecisive but now ime not so sure
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 21st Apr 2004 17:24
You are moving object 4 (the bullet) TOOOOOO FAST (move object 4,1000)

If you really need that speed, than use a for loop, or change the distance...



This code moves the bullet 100 times by 10.0 units. (100 for-loop * 10.0 speed) and checks if it's close enough.

When it's close enough it will play sound 12 and makes sure the object doesnt get hit anymore, by using a flag variable.

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"

Login to post a reply

Server time is: 2025-05-23 16:40:10
Your offset time is: 2025-05-23 16:40:10