Page 1 of 1

where is Base.LoadBaseInterface defined?

Posted: Wed Feb 04, 2009 8:12 pm
by legine
Hello,

What does this thing do? where is it defined? I checked base.h But couldnt find anything with the name. I dont understand. Would be great if someone can help me to understand this. :)

Re: where is Base.LoadBaseInterface defined?

Posted: Wed Feb 04, 2009 8:49 pm
by RedAdder
check base_util.cpp

Re: where is Base.LoadBaseInterface defined?

Posted: Thu Feb 05, 2009 1:59 am
by ace123
That is the magic function that allows you to create a GUI at any point in the game, which interrupts flight. It's used in mission/main_menu.mission in order to load the main menu screen at startup.

Similar functionality can be accomplished by docking you to a planet or unit, but it gives you less flexibility with what python code gets run, and you have to load an additional unit for it to work.

All the "Base.*" functions are defined in base_util.cpp. The difference between the 'Base' and 'VS' modules is that no functions in Base will work on a multiplayer server.

(I don't think you should worry about multiplayer yet, but custom.py has some functions to allow sending custom messages between the client and the server--look at bases/weapons_lib.py in PrivGold for some examples--and they work in single-player mode as well)

Re: where is Base.LoadBaseInterface defined?

Posted: Thu Feb 05, 2009 8:27 am
by legine
thanks that helps :-)