Page 1 of 1

[FIXED] ScenEdit_SetUnitSide works only once per session

Posted: Wed Jun 14, 2017 6:57 pm
by MrGandi
Hi there,

With the lua action ScenEdit_SetUnitSide I can change unit side only ones. If I try to change the same unit again the function doesn't work anymore. I've to safe the game and restart it. After that I can change the side back.
As far as I remember it was possible to change unit sides back and forth in the past.

Please have a look at attached file.
To change unit side just go to special action.

Do I miss something?
I'm using Build 936.17

RE: ScenEdit_SetUnitSide works only once per session

Posted: Wed Jun 14, 2017 11:50 pm
by Cik
paste the script you are using

RE: ScenEdit_SetUnitSide works only once per session

Posted: Thu Jun 15, 2017 5:26 am
by MrGandi
I'm using:
ScenEdit_SetUnitSide({side="blue", name="USS Virginia", newside="red"})

To get the unit back I used in the past:
ScenEdit_SetUnitSide({side="red", name="USS Virginia", newside="blue"})

RE: ScenEdit_SetUnitSide works only once per session

Posted: Thu Jun 15, 2017 8:18 am
by michaelm75au
It is not an issue with swapping back but it is not recording the unit on the 'red' side.
Having a look

RE: ScenEdit_SetUnitSide works only once per session

Posted: Thu Jun 15, 2017 9:23 am
by michaelm75au
Logged!

RE: ScenEdit_SetUnitSide works only once per session

Posted: Thu Jun 15, 2017 9:55 am
by michaelm75au
Not sure why this seems broken in .17 though

RE: ScenEdit_SetUnitSide works only once per session

Posted: Thu Jun 15, 2017 10:26 am
by Dimitris
Fixed for the next update.

RE: ScenEdit_SetUnitSide works only once per session

Posted: Thu Jun 15, 2017 11:29 am
by MrGandi
Thanks guys!! You're awesome!!!!