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 / detecting a collision

Author
Message
super_tornado_2
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 17:18 Edited at: 29th Jul 2003 20:24
Hi,

Sorry if this is unclear:

I have made this small game where the idea is 2 find a building avoiding the other buildings. I know how 2 detect a collision and when the human model and the wrong building colides it plays a sound.
When the model hits the right building ( a radar) it also plays the sound. I cant get it to detect that it has hit the radar rather than another building.

Also, i would like it to to clear the screen, ie the matrix, the objects, textures, backdrop, the sprites and bitmaps so that i can start a new level
Another thing to happen when it detects the collision is for it to play an animation that i have made
Thanks
supertornado2

super_tornado_2
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 19:02
is anyone there?

please help - it would mean a lot to me

super_tornado_2
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 19:33
I HAVE DB CLASSIC not pro

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Jul 2003 21:08
I have made this small game where the idea is 2 find a building avoiding the other buildings. I know how 2 detect a collision and when the human model and the wrong building colides it plays a sound.
When the model hits the right building ( a radar) it also plays the sound. I cant get it to detect that it has hit the radar rather than another building.

check out lesson 25 for a sliding collision example that works on most pcs.


Also, i would like it to to clear the screen, ie the matrix, the objects, textures, backdrop, the sprites and bitmaps so that i can start a new level

you have to manage this manually and track each object / sound /image/ array

deleting them as required and usually in order helps sanity

Another thing to happen when it detects the collision is for it to play an animation that i have made.

the above lesson25 will have a space to insert the play animation feature just after the collision hit aspect.

super_tornado_2
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 30th Jul 2003 13:27
thanks for the help...
I sorted out a couple of the problems
but not the collision one
i have got about 150 lines of code in my game all 'remed' out from trying everything
more help would be greatly appreciated (spelt wrong)
thanks
supertornado2

super_tornado_2
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 30th Jul 2003 16:53
help.......................................

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 4th Aug 2003 08:07
post your code if u want contextual help.

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 4th Aug 2003 14:16
all you need to do is know the object number of the player and the number for the radar building, so say the player is object 1 and the radar building is object 2

if object collision(1,2) then gosub target_hit

the numbers in the brackets are the objects you want to check collision for, then in target_hit you play your sound and the animation, then delete your objects, animations etc and start again, cheers.

Mentor.

Login to post a reply

Server time is: 2024-11-25 01:27:55
Your offset time is: 2024-11-25 01:27:55