![Smile :)](./images/smilies/icon_smile.gif)
Going to update to latest trunk too, which sadly means that the new version will not be compatible with the current savegames made with NoGo (and also the reason the version is now 1.0).
New version is cooking. Only change: fixed import()
Moderator: OpenTTD Developers
That would require the GS to have access to the client list and not just the company list.Kogut wrote:And get location of main viewport (top-left and bottom-right tiles)?
Done! ( http://devs.openttd.org/~truebrain/nogo ... cd69aca0b2 )Zuu wrote:Speaking of MP, it could be useful to have a API function to tell if the GS run in a single player or multi player game.
ScriptCompany::ResolveCompany. Has been there since day 1, even for AIsMinchinWeb wrote:(..)
- - is there a way to check directly if a company with a given index exists?
Already done (a while ago)Zuu wrote:(..)
Speaking of MP, it could be useful to have a API function to tell if the GS run in a single player or multi player game.
A scenario saved with a GS, will always open that GS (when available). So that is implemented. Same goes for savegames. The only thing 'missing' what I can see, is that you can load the scenario even without the GS. But I am not sure if we want to fix thatZuu wrote:(..)
Edit: Another feature that I think has been discussed, but not implemented is to bind a GS to a specific scenario.
I think that Zuu wants to protect GS from running in scenario other than original (it is easier to make tutorial on tutorial map rather that tutorial working on the arbitrary map)TrueBrain wrote:A scenario saved with a GS, will always open that GS (when available). So that is implemented. Same goes for savegames. The only thing 'missing' what I can see, is that you can load the scenario even without the GS. But I am not sure if we want to fix thatZuu wrote:(..)
Edit: Another feature that I think has been discussed, but not implemented is to bind a GS to a specific scenario.I might add a warning that you just loaded a scenario/savegame of which the GS was not available.
Perhaps a function in GSInfo to tell if the GS should show up for new games or not. (you could set this to false just before uploading it to bananas) Perhaps along with a banans-flag to not display it in the list, but only offer as dependancy?Kogut wrote:I think that Zuu wants to protect GS from running in scenario other than original (it is easier to make tutorial on tutorial map rather that tutorial working on the arbitrary map)TrueBrain wrote:A scenario saved with a GS, will always open that GS (when available). So that is implemented. Same goes for savegames. The only thing 'missing' what I can see, is that you can load the scenario even without the GS. But I am not sure if we want to fix thatZuu wrote:(..)
Edit: Another feature that I think has been discussed, but not implemented is to bind a GS to a specific scenario.I might add a warning that you just loaded a scenario/savegame of which the GS was not available.
Code: Select all
GSIndustry.GetLastMonthTransportedPercentage( industry, cargo )[code]
A similar function, but where we could specify a company would be cool. ( To know which company transported the most cargos )
Also, an api for money transfert ( perhaps in GSAccounting or GSCompany ) from/to a player or from/to the "void" would be cool.
Have you triedTorrasque wrote:A similar function, but where we could specify a company would be cool. ( To know which company transported the most cargos )Code: Select all
GSIndustry.GetLastMonthTransportedPercentage( industry, cargo )
Code: Select all
local transport = null;
{
local dummy = GSCompanyMode(1);
transport = GSIndustry.GetLastMonthTransportedPercentage( industry, cargo )
}
I didn't thought about it, but I don't think it works. This:Zuu wrote:
Have you triedThis should get the transport percentage of the company with index 1 and store it in the variable "transport". The curly brackets are there to limit the scope of the CompanyMode so that your usual company is restored at the end.Code: Select all
local transport = null; { local dummy = GSCompanyMode(1); transport = GSIndustry.GetLastMonthTransportedPercentage( industry, cargo ) }
Code: Select all
local transport = null;
{
local dummy = GSCompanyMode(1);
transport = GSIndustry.GetLastMonthTransportedPercentage( industry, cargo )
GSLog.Info("Industry 1 :"+transport);
}
{
local dummy = GSCompanyMode(2);
transport = GSIndustry.GetLastMonthTransportedPercentage( industry, cargo )
GSLog.Info("Industry 2 :"+transport);
}
Yes, there is my company and three AI.Zuu wrote:Does your game have 3 companies? (mind that in-game company index start at 0, while in the GUI it starts at 1)
Users browsing this forum: Bing [Bot] and 4 guests