Hi,
I've completely converted my loading-routines from B3D into BMax.
This is how I do it now (in BMax):
I have one type-instance called "Universe", which is a TUniverse type.
Inside this TUniverse, I have an array ASectors, which holds all pointers to all TSector type-instances inside the universe.
Inside each TSector, there's an array AStations, which holds all pointers to all stations inside this sector.
So, to get the name of the 3rd station inside sector 2, I simply can do this:
How "deep" can I go with this approach?
As there need to be some extra "levels" further, because each station can have it's own list of commodities that are for sale there.
So, for the name of the 5th commodity inside the same station, I would have to do this:
If you want the entire code (and try it for yourself to see how it works):
http://users.pandora.be/vge/SG/SG.zip
I've completely converted my loading-routines from B3D into BMax.
This is how I do it now (in BMax):
I have one type-instance called "Universe", which is a TUniverse type.
Inside this TUniverse, I have an array ASectors, which holds all pointers to all TSector type-instances inside the universe.
Inside each TSector, there's an array AStations, which holds all pointers to all stations inside this sector.
So, to get the name of the 3rd station inside sector 2, I simply can do this:
Print Universe.ASectors[2].AStations[3].Name$
How "deep" can I go with this approach?
As there need to be some extra "levels" further, because each station can have it's own list of commodities that are for sale there.
So, for the name of the 5th commodity inside the same station, I would have to do this:
Print Universe.ASectors[2].AStations[3].ACommodities[5].Name$
If you want the entire code (and try it for yourself to see how it works):
http://users.pandora.be/vge/SG/SG.zip