• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
K

Kaue Aftimus Rosa

@Kaue Aftimus Rosa
About
Posts
1
Topics
1
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    How to access Lobby Data in a Lobby Filter script?
  • K Kaue Aftimus Rosa

    Hi Everyone,

    I have created a lobby on the brain cloud design panel for my game with a super simple custom config json:

    {
      "canJoin": false
    }
    

    I am trying to access the value of canJoin data in my filter script. How does one go about doing that? Here is the script that I have so far:

    "use strict";
    
    function main() {
        
        var lobbyId = "??????";//Need help finding the lobbyId for this filter.
        var lobbyProxy = bridge.getLobbyServiceProxy();
        
        var postResult = lobbyProxy.getLobbyData(lobbyId);
        bridge.logDebugJson("Lobby Data Post Result", postResult);
        if (postResult.status == 200) {
            return postResult.data.lobbyTypeDef.roomConfig.canJoin;
        }
        return false;
    }
    
    main();
    

    In my client app I am calling LobbyService.FindLobby to join any lobby. Does the filter script run for every available lobby? If so how would I go about getting the lobby id in the filter script?

    Many thanks for your help!

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users