collision statements

CJ ONILLA
06-01-2001, 06:55 AM
say i was making a shooting game and i wanted to know when an object came in contact with another, how would i go about doing so?

Ad1
06-01-2001, 07:23 AM
if your bullet is small then you can put
<pre>if picBullet.left}picTarget.left and picBullet.left{picTarget.left+picTarget.width then
if picBullet.top}picTarget and picBullet.top{picTarget.top+picTarget.height then
msgbox"hit"
endif
endif</pre>
if your bullet is quite large then you may also want to check the right and bottom edges of the bullet the code is posted here (http://www.visualbasicforum.com/bbs/showflat.php?Cat=&Board=visbas&Number=27895&page=1&view=collapsed&sb=5&o=2&part=)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum