Page 1 of 1

[1.1.55] Can't change artillery wagon's force

Posted: Sun Feb 27, 2022 7:47 pm
by Muppet9010
You can't change an artillery wagons force via Lua API script. It accepts the request, but the force doesn't change.

1: Load save:
arty wagon force test.zip
(1.12 MiB) Downloaded 88 times
2: script to change the force of the player selected entity:

Code: Select all

/c
local carriage = game.player.selected
game.print("pre: " .. carriage.force.name)
carriage.force = game.forces.enemy
game.print("post: " .. carriage.force.name)
3: Hover over the locomotive and cargo wagon and run the above script in console. The force will change as expected.
4: Hover over the artillery wagon and run the above script in console. The force of the artillery wagon won't change, but no error occurs either.

Re: [1.1.55] Can't change artillery wagon's force

Posted: Sun Feb 27, 2022 7:55 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.