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/loading levels

Author
Message
gareth
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 21st Feb 2004 14:21
i making a game where its just one huge level split it to sections, so when u leave the area at the left u go to a new section, the sections are made up in darkbasic using cubes,plains etc. whats the most efficent way to load these sectiosn in, as so far if got pages of code just to make one small level.
any ideas
cheers in advance
-gareth
gareth
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 21st Feb 2004 14:30
i just search the forums and found help.
ive put each level in a separate db file, now i have problem with deleteing each object of the level before the second level is loaded.
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 21st Feb 2004 16:02
Just use a for..loop to delete all of the objects. Then after you have done that, load your level

Level Maker 3D: Download from www.levelmaker3d.co.uk/levelmaker3D.asp
DarkBasic Professional Editor: Download from www.levelmaker3d.co.uk/ide.asp
gareth
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 23rd Feb 2004 19:06
will i have to use an incremented value for each object, as some levels my have more or less objects than others, what i was trying to do was list the objects, positions in a txtfile and use that but db txtfiles make wierd charcters for a 0 and 1..
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 24th Feb 2004 11:32
Well, use a For...Next loop like DarkRider suggested, and have the maximum limit set to the maximum object number that there is in all the levels.

Then, in the For... Next loop, use an If Object Exists(objnum) test to make sure the object exists before trying to delete it.

That'll remove your entire level...

Hope I Helped...
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 16:22:35
Your offset time is: 2025-05-22 16:22:35