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.

Newcomers DBPro Corner / Object collision problems

Author
Message
Black Mesa
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 11th Aug 2006 08:33
I have a tower of boxes and I want to know when it falls over. I figured the easiest way would be to make a box slightly above the ground and check for objects colliding with it. I made the box which is object 3 and then used the code

if object collision (3,0)>6 then ....

because the objects less than 6 are sitting on the ground and I dont want them to trip the system. The problem is either it always gets triggered which I cant figure out because there is nothing that should be triggering it or it will never trigger even when the boxes hit the ground. Is there an easier way to do it or am I missing something?
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 11th Aug 2006 16:35
I think that we would need to see your code in order to see what it is exactly that you are doing.

Black Mesa
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 11th Aug 2006 20:32
Well I think I figured out my problem but I dunno what to do about it. I have another box (#2) That collides with the detecting box (#3) but needs to be where it is. As far as I can see when I test to see if the number is greater than 4 (the numbers of the boxes I want to test for) the number is 2 (because box 2 is sitting there colliding) so it returns false. When I delete box 2 it works perfectly and this bug doesnt occur with the box sitting on the ground. My question is, is there a way to ignore the collision between two boxes?

This is hard to follow so here is the code:

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 11th Aug 2006 21:06
DarkPhysics? Can't help you there, as I do not have it.

Black Mesa
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 11th Aug 2006 21:58
Oh yea, kinda forgot I was using that. The problem isnt physics related though.
Black Mesa
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 12th Aug 2006 02:52
Anyone have any ideas?
Black Mesa
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 13th Aug 2006 01:10
Anyone? This is really bugging me. I tried using the number 2 object to cycle through and see if anything was NOT touching it but when I tried

for test=4 to 58
if object collision(test,2)=0 then Condtion
next test

It kept saying it couldnt find the object on the object collision line even though it exsists. Im open to other ideas on detecting a fall too , anything that works.

Your mod has been erased by a signature

Login to post a reply

Server time is: 2024-09-25 05:26:09
Your offset time is: 2024-09-25 05:26:09