Disable Unit Shields when Submerged
-
I've been looking through the FAF GitHub for functions that controls shield states. I'd like to be able to set a naval unit to disable shields when submerged and re-enable when on the surface.
-
You need
OnLayerChange
andEnableShield
/DisableShield
inUnit.lua
for when a unit is moving into/out of water. You'll also need to modifyEnableShield
to prevent them from being turned on when in the water.