Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to add bots in matchmarker

Discussion in 'Matchmaker' started by peanutoil, Jun 26, 2023.

  1. peanutoil

    peanutoil

    Joined:
    Jun 15, 2023
    Posts:
    3
    I want to let the bot player participate in the match when there are too few players. Is there a way to achieve this in matchmarker?
     
  2. David_Gourde

    David_Gourde

    Unity Technologies

    Joined:
    Oct 18, 2021
    Posts:
    5
    Hey, yes it's possible.

    To achieve this, use Rule Relaxations.
    This lets you enable or disable rules based on triggers over time. In your case, you probably want to relax the minimum number of players in a match after a couple of seconds if it can't be reached. This way, if there's not enough players, the match gets created, but with a lower number of players (under the original minimum), and in your game, you could check the number of players and replace the missing ones with bots.
     
    peanutoil likes this.