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 / Collision problems

Author
Message
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 2nd Jan 2005 07:18 Edited at: 2nd Jan 2005 07:19
I made games with collision before,but when i add this code into the main loop of my newest game it dosnt delete the object when it collides.
Code:


What is wrong with this code?

Team Dark Knights:
http://www.teamdarkknights.com
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 2nd Jan 2005 09:39
That code should work. Are you sure it's object 4 that you want to delete? Check those object numbers.


I spelled "disappointment" wrong. Pahintulutan ang di-inaasahang nakakahiyang pagkakamaling dulot ng kamangmangan. Have at you.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 2nd Jan 2005 20:05 Edited at: 2nd Jan 2005 20:06
by the way, you need
or when it has detected the collision it will crash because the next time it tries to detect the collision there will be no object 4

also, if possible, try using pythagoras or coordinate based collision, as object collision really slows down crappy old machines like mine [img][/img]

Am I the only one here who's really confused?
http://db1games.topcities.com
(used to be demonsbreath)
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 3rd Jan 2005 04:43
Ok, il test the code later.

Team Dark Knights:
http://www.teamdarkknights.com
bibz1st
22
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 4th Jan 2005 00:02
also, make sure you are not re-making object 4 within your main loop

Login to post a reply

Server time is: 2025-05-24 16:54:55
Your offset time is: 2025-05-24 16:54:55