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 / Making slopes, how?

Author
Message
Asurath
18
Years of Service
User Offline
Joined: 18th Nov 2006
Location:
Posted: 18th Nov 2006 11:15
Im trying to make a game as a school project using DBC, a simple platform game, jumping between platforms running over this and that and so on.

I tried to add a "slope", a tilting box so to say, I just dont find out how to make it act as a collision box properly, does anyone have any idea what I should do? or perhaps an idea to make this slope with another command(s)?
atm I use make object box, zrotated it and then used the set object collision on command, but it wont work out as a I want to :/
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 18th Nov 2006 15:01
ok, first you should use a plain as the slope. then, use something like sparkys collision dll to stop you going under because of gravity. then write a piece of code that changes you speed according to your direction. pointing uphill will be slower than pointing down. hope this helped

RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 18th Nov 2006 15:36
If gravity is constant you wont need to do extra if checks to see which direction the user should move faster in, the object will automatically move down the slope faster than up.

The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 18th Nov 2006 21:46

Login to post a reply

Server time is: 2025-05-26 03:28:57
Your offset time is: 2025-05-26 03:28:57