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 Discussion / Ramp question

Author
Message
Guitarman
21
Years of Service
User Offline
Joined: 31st Jan 2004
Location:
Posted: 9th May 2004 00:29
Ok i have been programming for about 1 year now and am having trouble with having characters walk up ramps that i make with boxes. I don't want people to code this for me, i was just wondering if anyone could give a suggestion. Thanks.
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 10th May 2004 19:02 Edited at: 10th May 2004 19:03
Ramp code is identical to stair code. If you get a collision, you look up one 'step' and see if it is clear. If it is, you move up the stairs/slope/ramp. If it is not, you stop or slide instead.

Of course, going down a ramp is just a matter of applying gravity and forward momentum. Too much forward speed and you're airborne, anything less and you follow the slope/steps as you collide with them.
--
TAZ

[edit for typos]

Guitarman
21
Years of Service
User Offline
Joined: 31st Jan 2004
Location:
Posted: 13th May 2004 20:55
Thanks

Login to post a reply

Server time is: 2025-05-23 19:21:45
Your offset time is: 2025-05-23 19:21:45