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 / Help With Collision

Author
Message
Doomwad
21
Years of Service
User Offline
Joined: 29th Dec 2003
Location:
Posted: 27th Mar 2004 16:07
How can I check for one object colliding with different objects
For instance, I have a man in a maze, he collides with a monster and he dies, but if he collides with a wall, he just stops. I've tried the:

if object collision(1,0)>1
cls
print "Next Level!"
goto leveltwo
endif

But if the man collides with anything, then he goes to the next level. I know this must seem like a stupid question, but please help.
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 27th Mar 2004 17:30 Edited at: 27th Mar 2004 17:30
If you meet your wits end with trying to get things working with DB collision, then you'll want to check out our collision plugin. It really makes complex collision a lot less painful

Website link below

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
zane
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: manchester, england
Posted: 27th Mar 2004 20:05
you need to know the object no's for the man, monster and wall
eg- man=1
monster=2
wall=3

so to check for a collision with the wall, you put this


the for the monster


what youve done there is put a 0 as the second object value. this will return a one if the man collides with ANY other object

hope that helps

www.zaneproductions.tk - lots of games, no Dark basic ones though (yet)!
Doomwad
21
Years of Service
User Offline
Joined: 29th Dec 2003
Location:
Posted: 28th Mar 2004 04:30
thanks a lot Zane. And is it just me, or is it everytime there is a post about collision, Nuclear Glory always posts an advertisement?
Doomwad
21
Years of Service
User Offline
Joined: 29th Dec 2003
Location:
Posted: 28th Mar 2004 04:50
Wait... there's a problem. I implemented your code, and made the neccesary changes. But, one can't work, if the other one is first. I take one collision out (the one with the wall) and the collision works with the monster. But if I put it back in, then the collision with the wall works, but the one with the monster doesn't. Here is my code:
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Mar 2004 18:23
Yea he always does, which is really good. If we can eventually get everyone using that DLL there should be a lot less posts about how to use built in DB Collision (which sucks!) instead help with the NG DLL (which rules!)


We need help! Email us! [email protected]
zane
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: manchester, england
Posted: 28th Mar 2004 22:40
yes, it dose that somtimes. i think its just a quirk of db collisions.
try useing the "make object collision box" command. that useally fixes it for me.
and yes, nuclear glory dose respond to all collision questions. unfortunatly i carnt figure out the dll.

www.zaneproductions.tk - lots of games, no Dark basic ones though (yet)!
Doomwad
21
Years of Service
User Offline
Joined: 29th Dec 2003
Location:
Posted: 29th Mar 2004 01:01
I downloaded Nuclear Glory, but it is rather confusing. All I really need, is to check for a collision between two objects. I don't need any thing fancy. Heck, I'm using anim8or as level creator! (Creating an object and exporting it as .3ds)I can't use box collision, because if I go anywhere near the level (let alone in it) then I just stop. I fixed the problem, by setting collision to polygons. But, is there any error with my code?
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 29th Mar 2004 03:19
There seems to be a lot of that.

We were going to build a series of step-up examples and then had to rebuild the DLL over again and it ate up all the time for those step-up tutorials, lol.

We're about to do some more stuff with the DLL so I'll step back and make some KISS (keep it simple stupid) examples.

Anyone smell that? Smells like an NG codebase

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com

Login to post a reply

Server time is: 2025-05-23 06:01:34
Your offset time is: 2025-05-23 06:01:34