You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the target market/harbor of a market/harbor to establish a trading route.
Syntax
BOOLISettlers4Api::SetTradingRoute(
DWORD sourceBuilding,
DWORD destinationBuilding,
DWORD player
);
Parameters
sourceBuilding
The index of the building where the trade route starts. The player should own this building. It is usually a harbor or market.
destinationBuilding
The index of the building where the trade route ends. The player should own this building or be allied with the owner of this building. It is usually a harbor or market.
player
The player who issues the command. Use 0 (zero) to issue this event as the local player.
Return value
If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.
Remarks
The corresponding network event id of the command is ID 5005.
The building types of the source and destination should be the same. That means they both should be either harbors or markets.