Game script build road

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
kraken
Engineer
Engineer
Posts: 13
Joined: 16 Dec 2016 14:11

Game script build road

Post by kraken »

Hi,

It´s possible to build road using game script? In doc, there is a function GSRoad.BuildRoad and note

Building a piece of road (without CompanyMode) results in a piece of road owned by towns.

But I tried and does not work for me.
kraken
Engineer
Engineer
Posts: 13
Joined: 16 Dec 2016 14:11

Re: Game script build road

Post by kraken »

Thx, resolved.

Missing SetCurrentRoadType line;

Code: Select all

local roadType = GSRoad.ROADTYPE_ROAD;
GSRoad.SetCurrentRoadType(roadType);
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests