How to access Lobby Data in a Lobby Filter script?
-
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
canJoindata 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.FindLobbyto 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!
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