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

Author
Message
FireIndy
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: US of A
Posted: 23rd Aug 2007 16:11
Im fairly new to DarkBasic Pro and have a question. I know how to do collision on one object using the object collision command. But, how would I add it to all objects in game. Would I make an array for all items in the game then loop through it to add collision. I just dont know the best way to do it.

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 23rd Aug 2007 17:44
that's usually the way

for n=firstobjnum to lastobjnum
if object hit(player,n)=1 then -stop-
next n

etc..
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 23rd Aug 2007 17:46
At the bottom of the - 3d person camera view - thread there are a few examples with intersect object
FireIndy
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: US of A
Posted: 23rd Aug 2007 17:58
Thanks man

Login to post a reply

Server time is: 2024-11-26 11:24:55
Your offset time is: 2024-11-26 11:24:55