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 / Walking on a cube

Author
Message
Jigga
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location:
Posted: 25th Nov 2002 23:33
How do you make it so you can walk on a cube in DARK BASIC. When I say cube, I mean a cube made with the
make object cube 1,20 command.
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 26th Nov 2002 00:05
You have to make a collision box around that cube before the main loop:
Make Object Collision Box 1,-10,-10,-10,10,10,10,0

Inside the loop just before the position object player commands, put this:
ObjCol=Object Collision(1,0)
If ObjCol=1
If Get Object Collision Y()<>0 Then Inc PlayerYPos#,0.1
EndIf

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.

Login to post a reply

Server time is: 2024-03-03 02:34:51
Your offset time is: 2024-03-03 02:34:51