15

So, this is a question about the game screeps. I know that in the simulation, I can create a road by going to the Construct menu on the left, but is there an API reference I can use to create one programmatically? My goal is to have a script that will automatically lay down construction sites between target A and target B. Has anyone found such a reference in the docs?

(I would tag this question with the screeps tag, but it appears I cannot do so with my current reputation. If this is the wrong place to post, please direct me to the right place, I just came here from the screeps website)

4

2 回答 2

30

更新:Room.createConstructionSite今天已向 API 添加了一个方法(更改日志)。示例用法:

Game.rooms[roomName].createConstructionSite(10, 15, STRUCTURE_ROAD);

帖子: Screeps 的开发人员在这里。事实上,目前还没有这样的 API,但我们计划很快添加它。完成后我会更新我的答案。

于 2014-11-21T05:27:20.847 回答
2

我检查了 Screeps API ( http://screeps.com/docs/index.php ),我认为不可能以编程方式创建结构。

于 2014-11-21T02:05:31.447 回答