Mission Establish Trade Route

LastSword

Prince
Joined
Feb 24, 2013
Messages
1,064
How to push this mission (if possible)?

I have started with (mission, x, y), then I have played/wasted some time around. Quite curious how core is handle it.
 
Assuming pUnit is trying to trade at pPlot, try

Code:
-- or TradeConnectionTypes.TRADE_CONNECTION_FOOD or TradeConnectionTypes.TRADE_CONNECTION_PRODUCTION
local iTradeConnectionType = TradeConnectionTypes.TRADE_CONNECTION_INTERNATIONAL 
pUnit:PushMission(MissionTypes.MISSION_ESTABLISH_TRADE_ROUTE, pPlot:GetPlotIndex(), iTradeConnectionType)
 
TradeConnectionTypes. results in error (nil value)
I have used integers:
nil or 0 for International
1 for Food
2 for Production
and it works. Note: using nil for domestic Trade Route results in Trade Route without bonus!

Thanks a lot. Question answered.
 
Top Bottom