[0.5.0 and before] unit.setcommand crashes the game

This subforum contains all the issues which we already resolved.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

[0.5.0 and before] unit.setcommand crashes the game

Post by rk84 »

When using gotolocation type command in console factorio stops working. tested destination with and without x and y keys.

Code: Select all

creeper = game.player.character.getselected()

creeper.setcommand({ type=defines.command.gotolocation, destination={x=0,y=-40} })
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [0.5.0 and before] unit.setcommand crashes the game

Post by ficolas »

what about if you run it by the control.lua?

Also Im not sure but I think you need to add a distraction, or that is just for attackimg?
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [0.5.0 and before] unit.setcommand crashes the game

Post by rk84 »

ficolas wrote:what about if you run it by the control.lua?

Also Im not sure but I think you need to add a distraction, or that is just for attackimg?
yea its same in control.lua
Wiki says distraction is optional for both command types and it does crash with or without it.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.5.0 and before] unit.setcommand crashes the game

Post by slpwnd »

Thanks guys. Fixed for 0.5.1.
Post Reply

Return to “Resolved Problems and Bugs”