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 / How to code "see inside" DarkBASIC...

Author
Message
Mitch
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: The Netherlands
Posted: 18th Nov 2003 20:35
Hi. I'm new to DarkBASIC.. I have some experience with programming.. Though that's VERY minimum.. How do I code fastloops in DB? I did it like this before, though this is not the code.. I did it with klik ..

Object is overlapping "Ground" -> Start Loop "Up", 10 times

On Loop "Up" + Object is overlapping "Ground" -> Set object Y to object Y-1

On Loop "Up" + Object is NOT overlapping "Ground" -> Stop loop "Up"

..I used to do this the oppisite way aswell (down) with some detectors, it gave me a good, flawless slope engine.. Can I use this in 3d?? Thanks in advance XD

Me vs. The World...
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 18th Nov 2003 20:57
?

lalala
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 18th Nov 2003 21:05
ik vat niet echt wat je bedoelt

lalala
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Nov 2003 21:46
the problem is, the code in db is completely different and probably abit more complicated than the example you have given. maybe try and start right from the beginning by going through the tutorials that come with db.


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Mitch
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: The Netherlands
Posted: 18th Nov 2003 22:11
I will, once it's delivered ! I was thinking.. From the experience with the trail version, It could probably be like this:



Could this work?

ps: some codes I don't know yet.. Like the collision test and getting object positions.. Hope you get it

Me vs. The World...
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 19th Nov 2003 04:48
Quote: "some codes "


CODE IS NOT PLURAL! Just to warn you, people dispise this

Collision is really simple, but first you need to know variables and object positions which is even simpiler

Object Position X(ObjNum) will return the position on the X axis of the specified object in 3D Space. So, if I say...

ObX#=Object Position X(1)

ObX# will now tell me where the object numbered ONE is on the X axis in 3D space. You can do this for all variables

Now for collision, here is a basic example

If Object Collision(1,10)>0
Dec ObX#,Get Object Collision X()
Dec ObY#,Get Object Collision Y()
Dec ObZ#,Get Object Collision Z()
Position Object 1,ObX#,Oby#,ObZ#
Endif

Now you cant copy and paste that as I used undeclared variables. I have a quick sliding collision couple of functions in Code Snippets. They may help you out to start off

Hope this helps you out a bit

RPGamer


Dont forget to Join the Forums!

Login to post a reply

Server time is: 2025-05-21 19:24:00
Your offset time is: 2025-05-21 19:24:00