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 / can't figure this one out (collision, help please.)

Author
Message
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 27th Mar 2003 17:13
ok!
i've created a code, just to test something. i wanted to do a box and use this for line of sight. But collision didn't work at all. It gave me zero all the time.(you can see, if there's collision between the sight box and red box by the number in the upper left corner). Anyway, here's the code. Someone please help me figure this one out?? please? PLEEASEEEE? :-s

if me in trouble() and 1=1 then print "but"
xmen
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 28th Mar 2003 00:45
try this

i think you have your two objects mix up


col=object collision(2,0)
if col>0
collision#=col

else
collision#=0
endif
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 28th Mar 2003 11:09
nope that would'n work! It still didn't check for collision.

if me in trouble() and 1=1 then print "but"
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Mar 2003 14:08
Try having your main object as object 0

Then try

For x=1 to (however many objects you have)
if object collision(0,x)=1
collision=1
if collision=1
(you collision code)
endif
endif
else collision=0
next x

Written off my head so it may not work (plus you have to put in your own collision code)

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!

Login to post a reply

Server time is: 2024-11-24 07:40:56
Your offset time is: 2024-11-24 07:40:56