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

    Need help in coding

    Scheduled Pinned Locked Moved I need help
    3 Posts 2 Posters 271 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
      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
        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
          GeneralJenson
          last edited by

          Thank you very much sir. Well appreciated.

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