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 / Walking in a level

Author
Message
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 23rd Jul 2003 18:08
I have done my basic .x collisions and now need to be able to walk on .x level it has ramps and stairs so this also needs to be taken into consideration, any help would be great.

oh and please don't say use kansupens code cos i have it and don't understand it.

thanx
Dakta
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 23rd Jul 2003 19:33
I'd help you but I have the same problem.
Maybe it aint darkbasic thats the problem.
Maybe its me.
Im about to commit suicide.
COOL!!!!!



*******
*Dakta*
*******
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 23rd Jul 2003 19:52
knuspen's code only works in DBpro, maybe that's the prob

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 10GB HD, Geforce 4 Ti4400 128mb ddr sdram
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 23rd Jul 2003 20:37
everyone seems to be going on about the intersect object command(in pro) when they're talking about this

You know whats weird???
Donald duck never wore pants, yet everything time he got out of the shower he put a towel around his waist...
Whats with that???
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 23rd Jul 2003 21:04 Edited at: 23rd Jul 2003 21:05
gggrrrr mussi i have dbpro, and i just said i don't understand it!

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Jul 2003 23:28
K's code is really the best way to do it, so I suppose I'll have to try and explain how INTERSECT OBJECT works

The basics are that you specify a start position and an end position, and it will slowly trace along the line between these points until it either gets to the end, or hits the object that you have specified.

If it gets to the end point without detecting a collision it will return a value of 0.

If it instead hits the object you're looking for, it will return the distance between your start point and where it collided with the object.

The way that K's code works is to use several INTERSECT OBJECT commands in a vertical direction for the floor, and horizonally for wall detection. When the distance to a wall becomes small enough, his code will no longer let you move in that direction.
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 23rd Jul 2003 23:55
What?

ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 24th Jul 2003 11:27
intersect object draws lines from your object that you can use to detect collision, so you need horizontal lines to detect collision with walls and vetical lines to detect collision with
floors and ceilings.

You know whats weird???
Donald duck never wore pants, yet everything time he got out of the shower he put a towel around his waist...
Whats with that???

Login to post a reply

Server time is: 2026-07-06 07:16:00
Your offset time is: 2026-07-06 07:16:00