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 / Multiple collision ?

Author
Message
Darkmagic
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 6th May 2003 14:02
Hi,

Is it possible to detect for more than one collision on an single object at a time ?


Has anyone got any code to do this this ?
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 6th May 2003 14:14
you can never do more then one thing at the same time, that's the nature of programming^_^ Think in steps...

CheckCollision thing here
CheckCollision again with a different object

The 3D Modeler's Group : http://groups.yahoo.com/group/3dModeler/
The Unofficial DB Newsgroup : http://groups.yahoo.com/group/DBMag/
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 7th May 2003 00:41
multiple collision as to what?
the player being hit more then once and lose stamina? put a counter to check how many times it has been hit
if "player is hit" then counter 0 counter +1

the player being hit at once by several shots?
put a for / next loop
for n=first bullet to last bullet
if "player hit" then count=count+1
next n
Print "player has been hit", count, "times"

or what else?
PS sorry for the "verbose" coding..
Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 10th May 2003 00:32
for/to loop. For example:

for t=100 to 500
if object collision(1,t)=1
<collision code>
next t

That's assuming your player is object 1 and your statics (or other objects you're checking collision for) are 100 to 500. Don't make the loop unneccesarily long, it'll waste clock cycles. Hope that helps.

--Mouse

Famous Fighting Furball

Login to post a reply

Server time is: 2024-11-10 07:42:18
Your offset time is: 2024-11-10 07:42:18