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 / Help with object collisions

Author
Message
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 5th Oct 2006 02:40
I just started to use Dark Basic Classic after finally purchased it and i looked at some tutorials but i'm having serious problems. For some reason the computer keeps saying object does not exist at random times and i need help with object collisions. the code is attached


thanks
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 5th Oct 2006 03:51
Okay, notice how here:



you delete object 9999 because you made a mesh. Meshes and objects are separate, and when you delete an object you can't use it anymore. So, when you try to do this:



and this:



you can't because you already got rid of object 9999 using the DELETE OBJECT command. Delete object completely gets rid of an object, so you can't use it again. There's the error.

Ummm...
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 6th Oct 2006 00:38
thanks it works now
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 6th Oct 2006 03:05
But is there any dignified way to make what i want and still have the object collision. becuase if i delete the delete line it makes the object appear and i can hide that. But it doesn't do object collison because it is not he object. Do i have to change the collison to the limb? And if yes how?
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 7th Oct 2006 02:54
okay i have change it a bit. what i want to do now is what i did before. Like the cylinder moves with sphere. What sort of rotation or movement do i need . The new code is here


really any help would be usefull
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 7th Oct 2006 22:45
sorry for all the repost but i have been workin on it. I would like to know if you can set object collision to limbs. also i changed the limb commands and i was wondering if what i did was a good idea.
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 8th Oct 2006 21:03
okay so i figured everything out but i'm back to the orginal question at the top of the thread. My object collision still doesn't work and it all the objects exist any suggestions.


please respond
Nenohum
18
Years of Service
User Offline
Joined: 21st Sep 2006
Location: In a galaxy far, far, away.....
Posted: 9th Oct 2006 06:10
okay figured out last problem but how do i make the cylinder follow my player with every turn. some help would be much appreciated.



someone please respond

if con is the opposite of pro, than is congress the opposite of progress?
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 31st Oct 2006 00:27
Ok, the program is crashing because once object object 2 has been deleted, the object collision function will crash because object 2 no longer exists.

Put this code above the if statement and add an endif below the other endif



If you want to make the cylinder follow the player, use make mesh from object to get the cylinder mesh, delete the cylinder, and add a limb to the player with the cylinder mesh, put in an offset, then delete the mesh.

Confucius say click the link to become a master game developer.
http://www.dexterity.com/articles/

Login to post a reply

Server time is: 2024-09-25 11:28:55
Your offset time is: 2024-09-25 11:28:55