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.

Author
Message
muphesto
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location:
Posted: 27th Nov 2003 18:53
is there anyway to load other codes into your main code

ie

load level 1
load level 2
load level 3

etc....if this was a bigger code overall...just each level of mine is about 300 lines long so it get complicated to look at
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 27th Nov 2003 18:59 Edited at: 27th Nov 2003 19:03


what it will do is do code, when it hits the gosub it will take you to the heading you give it, in this case 'blah:' then it does level code until it hits the return, it then takes you back and does code2. you could even do it as a function, but that is a little differnt, but this should get you off on a good start

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0%
muphesto
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location:
Posted: 28th Nov 2003 02:07
cheers man i get what u mean
but i was asking more like...can u import other codes from a folder...so instead of having 500 lines of txt u have maybe 20 and a few of them are links to other codes which may be 200 lines on there own

that make sense?
Clarks
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: BALTIMORE,MARYLAND
Posted: 28th Nov 2003 02:48
Thats just what functions are for. DB has to ability to include other db files. When those files are included just call the functions where you need them. And one feature that comes in handy is that functions can call other function. Just be careful of what type of names you use and be careful with spaces.

sync on
sync rate 30
#include "level.dba"
#include "playercontrols.dba"

level_1

do
player_controls
sync
loop

Login to post a reply

Server time is: 2025-05-21 16:48:28
Your offset time is: 2025-05-21 16:48:28