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.

Newcomers DBPro Corner / Multiple source files?

Author
Message
Ubuntuz
12
Years of Service
User Offline
Joined: 17th Feb 2012
Location:
Posted: 31st Mar 2012 18:55
Sup,

I'm making a zombies game and I would like to keep the main menu code and the main game code separate to make things easier to navigate - i have the two .dba's but how do I use the main game one?

Thanks,
Ewan
Koolmist
12
Years of Service
User Offline
Joined: 17th Mar 2012
Location: Washington
Posted: 31st Mar 2012 19:54 Edited at: 31st Mar 2012 19:57
I don't know if this is right but what I have done is set my "core.dba" as the main file in DBP and put this code at the top..

this way it runs those files first and then returns to the main code onces it is complete.. As previously stated i don't know if this is the right way to do it but it works for me.. so i figured I would give you an option..

EDIT I also put main_menu: at the top of my menu.dba file so it would work..


Koolmist

Gaming is not just entertainment,
Gaming is a lifestyle!!
Ubuntuz
12
Years of Service
User Offline
Joined: 17th Feb 2012
Location:
Posted: 31st Mar 2012 22:31
Aha, thanks very much! You are a life saver!
Ramon156
13
Years of Service
User Offline
Joined: 13th Jul 2011
Location: Netherlands
Posted: 4th Apr 2012 15:01 Edited at: 4th Apr 2012 15:02
I'm wondering if there's also such a command to load your own made extensions.

Main DBA file :





Then my keystate function would be in the file "Keystate.Function"





Is this possible, and if so, could this also be done to have more loops? I have 2 loops in my game, ShopMenu and Game.
Would be easier to have those loops in seperate files.


Edit - Changed Quote to Code tags.

Login to post a reply

Server time is: 2024-11-22 04:20:52
Your offset time is: 2024-11-22 04:20:52