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

    Disable Unit Shields when Submerged

    Scheduled Pinned Locked Moved Modding & Tools
    2 Posts 2 Posters 273 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 Offline
      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 Offline
        CocaineDiesel
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post