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

    Need help in coding

    Scheduled Pinned Locked Moved I need help
    3 Posts 2 Posters 259 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.
    • G Offline
      GeneralJenson
      last edited by

      Guys can you give me some advice on what to add to this sample codes so that the ai will only build it when the player has only one land experimental built.

      Sample:
      opai = FortClarke:AddOpAI('UEF_Fatboy_1',
      {
      Amount = 2,
      KeepAlive = true,
      PlatoonAIFunction = {SPAIFileName, 'PatrolThread'},
      PlatoonData = {
      PatrolChain = 'M4_UEF_LandAttack_Mid_Chain',
      },
      MaxAssist = 8,
      Retry = true,
      }
      )

      1 Reply Last reply Reply Quote 0
      • speed2S Offline
        speed2
        last edited by

        opai = FortClarke:AddOpAI('UEF_Fatboy_1',
            {
                Amount = 2,
                KeepAlive = true,
                PlatoonAIFunction = {SPAIFileName, 'PatrolThread'},
                PlatoonData = {
                    PatrolChain = 'M4_UEF_LandAttack_Mid_Chain',
                },
                MaxAssist = 8,
                Retry = true,
                BuildCondition = {
                    {'/lua/editor/otherarmyunitcountbuildconditions.lua', 'BrainsCompareNumCategory', {{'HumanPlayers'}, 1, categories.EXPERIMENTAL, '>='}},
                }
            }
        )
        
        1 Reply Last reply Reply Quote 1
        • G Offline
          GeneralJenson
          last edited by

          Thank you very much sir. Well appreciated.

          1 Reply Last reply Reply Quote 0

          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