SAR Script Issue in Game_LuaInit
Posted: Sat Jan 28, 2023 4:55 pm
I was playing the Brother Against Brother, 2011 Standalone scenario. I was trying to get the SAR to work and discovered a bug in the Game_LuaInit file. When the liferafts are spawned and appear on the map, they aren't selectable as contacts - they just appear as friendly units.
In the Lua Script, the selections for SAR are checked assuming the survivors will always be a selected contact and never a selected unit.
Even when the correct units are selected in game, selectedUnits.contacts == nil is ALWAYS true. The survivors are always in the selectedUnits.units list. I rewrote the function to handle this issue appropriately, outputting the same information in the same format.
When I tried to update the scenario file directly, there is no Game_LuaInit file in the scenario directory. My question is, how do I either change which LuaInit file gets run at the start of the scenario or how do I modify the Game_LuaInit file itself? Reloading the scenario did nothing.
In the Lua Script, the selections for SAR are checked assuming the survivors will always be a selected contact and never a selected unit.
Even when the correct units are selected in game, selectedUnits.contacts == nil is ALWAYS true. The survivors are always in the selectedUnits.units list. I rewrote the function to handle this issue appropriately, outputting the same information in the same format.
When I tried to update the scenario file directly, there is no Game_LuaInit file in the scenario directory. My question is, how do I either change which LuaInit file gets run at the start of the scenario or how do I modify the Game_LuaInit file itself? Reloading the scenario did nothing.