FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Disable Unit Shields when Submerged

    Scheduled Pinned Locked Moved Modding & Tools
    2 Posts 2 Posters 281 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Rama
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • C
        clyf
        last edited by

        You need OnLayerChange and EnableShield/DisableShield in Unit.lua for when a unit is moving into/out of water. You'll also need to modify EnableShield to prevent them from being turned on when in the water.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post