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 help plz help

Author
Message
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 9th Nov 2003 22:05
if i was to have a lot of objects and i wanted to shoot each one without writing loads of code how could i do it. what i would like to know is can you detect the object number the bullet colides
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Nov 2003 22:23
Look into FOR NEXT processes

For x=1 to 100
Make object cube x,10
Next x

Will make 100 10 unit cubes

RPGamer


Eternal Destiny Website - Launch Date: 11/8/03
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 9th Nov 2003 22:38
but how can you detect which one was shot, so i have 100 objects and i shot say object 50 or any one how would i be able to delete it
i could right out:
if object collision(bullet,objectnum)
endif
100 times but that would take some time and space so how could i do it easier and get the location on where it was hit to do an explosion effect
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Nov 2003 23:37
erm, check collision of bullet with 0, meaning if the bullet hit anything the function will return the object number that was collided with, then use a range of known object value numbers to take the appropriate action...

if your objects are 2-100 and your bullet is object 1 then

ColTest=object collision(1,0)
if coltest > 1 and coltest <=100 then......

-RUST-

Login to post a reply

Server time is: 2024-09-21 09:31:18
Your offset time is: 2024-09-21 09:31:18