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

Author
Message
ClearCoder
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th Apr 2003 14:13
in my bomber man clone game (beta @ www26.brinkster.com/dudemansoftware) i am tring to put in some objects that you can blow up around the arena but the collision of your bomb explosion (objetc 15 in code) and the object you can blow up (object 36 in code) isn't working heres he code

obcol:
If object collision(36,15)= 1 then position object 36,X#,100,Z#
return

sub "obcol:" will be a lot bigger once i add more objects to be blown up. The program goes to this after te gosub obcol which is in the main loop section if you can spot what wrong plz reply coz i can't

see ya
dudeman
Newbie Now
Expert Later
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 5th Apr 2003 20:03
Change you code to:

If object collision(15,36)= 1 then position object 36,X#,100,Z#

Because object 15 collides with object 36, not the other way around (I think). Also, if your gonna arrange more collisions, use object collision(15,0) which will return the value of any object object 15 collides with, i.e if it collides with object 36, print object collision(15,0), will display 36. This make it easier to use if..then to organize collision, rather than repeatedly check for collision for each separate object.

Whatever I did I didn't do it!
ClearCoder
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 6th Apr 2003 13:18
thx alot i'll try it also that explains a lot of bugs in my collision thx
seeya
dudeman

Newbie Now; Expert Later
Current project: Bomber Blitz Final
http://www26.brinkster.com/dudemansoftware/12.bmp
ClearCoder
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 9th Apr 2003 15:45
Soz but its still not working

Newbie Now; Expert Later
Current project: Bomber Blitz Final
http://www26.brinkster.com/dudemansoftware/12.bmp

Login to post a reply

Server time is: 2026-06-11 16:41:29
Your offset time is: 2026-06-11 16:41:29