At the start of the game the position of player is allways 0,0 on the map or is there some case it's different ?
Also performant wise question :
Did it require the same time to access player.position.x than set it as variable at start of the function x = player.position.x when I need to check multiple time that value inside my function?
Starting position
Re: Starting position
Unless a mod/scenario script changes it starting is always 0,0 But why take chances, there is an api for thatvtx wrote:At the start of the game the position of player is allways 0,0 on the map or is there some case it's different ?
http://lua-api.factorio.com/latest/LuaF ... n_position
It would be quicker to set x as a local variable inside your function. (local x = player.position.x)Also performant wise question :
Did it require the same time to access player.position.x than set it as variable at start of the function x = player.position.x when I need to check multiple time that value inside my function?
Re: Starting position
Thanks.

