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.

DarkBASIC Professional Discussion / Question about collisions

Author
Message
BeastMaster
10
Years of Service
User Offline
Joined: 10th Apr 2015
Location:
Posted: 14th May 2015 21:43
Im trying to make a game where if you walk over an object it dissapears but all it does is crash into that object and i have no clue how to make it dissapear if you walk over it. can someone give me an example of code where it works or just tell me how?
MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2015 16:20
Hands On DBPro Book 2 details the inbuilt collision library, and is an essential MUST HAVE for any DBPro developer, as is Book 1!

http://www.thegamecreators.com/?m=view_product&id=2162

Scroll to the bottom for the PDF edition... Digital Edition...

Alternatively look for Sparkys collision DLL on the forum here... not sure if that is the correct name for it but give it a go...

Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 15th May 2015 20:06


or




where object 1 is your character and object 2 is the object to hide or delete, depending on what you need to do

This line must be inserted in your do/loop cycle, but previously you have to create the collisions for the 2 objects, for example:


Login to post a reply

Server time is: 2025-05-11 02:12:47
Your offset time is: 2025-05-11 02:12:47