The only solution I've found so far is to use a mod
Using the code from the Steam discussion post (thanks for the link, @Sentry), I got it working
- Install the mod loader, BLT
- Create the APSentry mod
- Create an
APSentry
folder in Steam\SteamApps\common\PAYDAY 2\mods\
- Create a
mods.txt
file in the APSentry
folder
- Create a
APSentry.lua
file in the APSentry
folder
mods.txt contents:
{
"name" : "APSentry",
"description" : "Places sentries as AP sentries",
"author" : "",
"contact" : "",
"version" : "1",
"updates" :
[
{
"revision" : 1,
"identifier" : "APSentry"
}
],
"hooks" :
[
{"hook_id" : "lib/units/interactions/interactionext", "script_path" : "APSentry.lua"}
]
}
APSentry.lua contents:
local setup_original = SentryGunFireModeInteractionExt.setup
function SentryGunFireModeInteractionExt:setup(...)
managers.enemy:add_delayed_clbk("sentry_switch_" .. tostring(self._unit:key()), callback(self, self, "_auto_switch_firemode"), 0)
return setup_original(self, ...)
end
function SentryGunFireModeInteractionExt:_auto_switch_firemode()
if self:is_owner() then
if not self._sentry_gun_weapon._use_armor_piercing then
self:interact(managers.player:player_unit())
end
self:set_active(false)
end
end