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 / Staying ontop of cubes

Author
Message
Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 20th Nov 2005 16:25
In my game I want to make it so you can't move off of th cubes that are the ground. Is there anyway to do this?

CODE:



Am I dead yet?
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Nov 2005 17:47 Edited at: 20th Nov 2005 17:49
There are ways, try using the intersect object command, that's what I use

[edit]

Try out Sprakys collision dll, it's great, Infact, I think they're putting it into the next update

Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 20th Nov 2005 21:41
I really don't understand how you use the intersect object command for collision... I don't know how it works, and the DBPro Index isn't very helpful. How do use the interect object command for collision?

Am I dead yet?
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Nov 2005 21:45
well, using the intersect object command, it check first if any line that you are putting out is intersecting with anything.. i.e. if you do the intersect object command to go straight ahead, say 100 units, if you are 101 units behind an objects, the inersect object command will return a value of 0, but if you are <100 units behind the object, it will tell you the distance between you and the point where it's colliding.. next step is to check if the distance is less that the collision radius, and if it is, then stop moving.

Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 21st Nov 2005 23:31 Edited at: 22nd Nov 2005 00:27
Thank you... I did all of that. but for some reason, whenever I move the number changes to 0? Any Sugestions? (I also only want you to stop when you run into the walls.)



To run it you need a notepad program that says this and is named Maps.txt:
0111111110
0111111110
0110110110
0110110110
0110110110
0110110110
0110110110
0110110110
0111111110
0111111110
(Or something close to that)

Am I dead yet?

Login to post a reply

Server time is: 2024-09-24 09:29:36
Your offset time is: 2024-09-24 09:29:36