I can't seems to figure out how to give position for gotolocation type command.
Example.
Code: Select all
creep.setcommand({type=defines.command.gotolocation, ?=positiontable, distraction=defines.distraction.byenemy})
Code: Select all
creep.setcommand({type=defines.command.gotolocation, ?=positiontable, distraction=defines.distraction.byenemy})
slpwnd wrote:The field name is "destination". I have updated the setcommand description at the wiki: https://forums.factorio.com/wiki/inde ... setcommand
Code: Select all
creeper = game.player.character.getselected()
creeper.setcommand({type=defines.command.gotolocation, destination={x=0,y=-40}, distraction=defines.distraction.byenemy})