Question about AIOrder.AppendOrder. I want to have two order flags like below (which has the wrong syntax;
What is the correct syntax for more than one order flag? (like below, non-stop and full-load
AIOrder.AppendOrder(new_bus, this.stationOne.tile, [ AIOrder.AIOF_FULL_LOAD , AIOrder.AIOF_NON_STOP_INTERMEDIATE ] );
AIOrder.AppendOrder
Moderator: OpenTTD Developers
Re: NoAI Branch - An AI Framework
Well, if it works how flags normally work, you should be able to combine them with a binary or.
edit: yes, confirmed. so in your case
Code: Select all
FLAG1 | FLAG2
Code: Select all
AIOrder.AppendOrder(new_bus, this.stationOne.tile, AIOrder.AIOF_FULL_LOAD | AIOrder.AIOF_NON_STOP_INTERMEDIATE );
Re: NoAI Branch - An AI Framework
I thought I had tried that, but I guess I must have made a mistake, thanks for confirming.Roujin wrote:Well, if it works how flags normally work, you should be able to combine them with a binary or.
edit: yes, confirmed. so in your caseCode: Select all
FLAG1 | FLAG2
Code: Select all
AIOrder.AppendOrder(new_bus, this.stationOne.tile, AIOrder.AIOF_FULL_LOAD | AIOrder.AIOF_NON_STOP_INTERMEDIATE );
Who is online
Users browsing this forum: No registered users and 37 guests