Sign In Register

How can we help you today?

Start a new topic
Answered

UE4 GSMessageListener events not called

Hey.  I'm pretty new to Gamesparks so I could be making a silly mistake somewhere but here's my problem.


I'm using UE 4.12.2 with the latest Gamesparks plugin from bitbucket.

I have a simple match set up on the portal.  In my player controller I execute GSFindMatchRequest on two different clients/accounts and log the json response.  This response seems to be giving me correct information, the correct opponent is listed on both screens along with the match id, indicating the match making has been successful.

But none of the match listener events from GSMessageListeners, that I assume should be firing, are actually being called.

I have also tried setting up a match as shown in the Hearthstone tutorial using a custom event called through GSLogEventRequests with no joy.


I used GameSparks briefly a few months ago and i believe this was working fine then.  Am i screwing up?  Is this a bug with the latest UE4 plugin?  Gamesparks is pretty tricky to learn and not getting feedback through the listeners is making it even harder.


Any help would be great.


Find Match Setup:




Output Log:

UGameSparksModuleLog: Received auth token

UGameSparksModuleLog: Send immediate request: {

    "@class": ".FindMatchRequest",

    "matchGroup": "group1",

    "matchShortCode": "matchFriendly",

    "skill": 5,

    "requestId": "1465992101_1"

}


UGameSparksModuleLog: WebSocket callback: {"@class":".FindMatchResponse","matchId":"576143a9b002c304c4c1dad4","opponents":[{"displayName":"Rob","externalIds":{ },"id":"575d76c02c3d6104b717d06a","online":true,"peerId":2,"scriptData":{ "POSVAR" : { "" : [ 1 , 1 , 1]}}}],"peerId":1,"playerId":"575d75c21474e704b52d713c","requestId":"1465992101_1"}


LogBlueprintUserMessages: [BP_PlayerController_C_0] Server: {

    "@class": ".FindMatchResponse",

    "matchId": "576143a9b002c304c4c1dad4",

    "opponents": [{

            "displayName": "Rob",

            "externalIds": {

        },

            "id": "575d76c02c3d6104b717d06a",

            "online": true,

            "peerId": 2,

            "scriptData": {

                "POSVAR": {

                    "": [1, 1, 1]

                }

            }

        }],

    "peerId": 1,

    "playerId": "575d75c21474e704b52d713c",

    "requestId": "1465992101_1"

}


Best Answer

Hi Ronan,


I've just noticed you're using a FindMatchRequest, this has been deprecated and been replaced with the MatchMakingRequest. MatchmakingRequests are the newer and more powerful versions of FindMatchRequest, so you should use MatchmakingRequest going forward. When a match is found with a MatchMakingRequest a "MatchFoundMessage" is sent to the matched players, a "MatchNotFoundMessage" is sent if not match is found. The FindMatchRequest doesn't send matched players a message when matched. Can you try it with a MatchMakingRequest and let me know how you get on ?


Thanks,

Liam


Just want to bump this issue.  I still can't get events to fire on match found, not found or any other event.  From what I can tell this is a bug rather than an issue of my own making.  I have tried the latest version of the plugin released yesterday and I've had no joy either in Blueprints or binding to the delegates in C++.  


Are these working when tested internally?  Anyone have any thoughts?  After 6 days of silence I'm thinking it's time to look at other options for a backend.

Hi Ronan,


Apologies for delayed response, I'll get this looked into for you.


Thanks,

Liam

Answer

Hi Ronan,


I've just noticed you're using a FindMatchRequest, this has been deprecated and been replaced with the MatchMakingRequest. MatchmakingRequests are the newer and more powerful versions of FindMatchRequest, so you should use MatchmakingRequest going forward. When a match is found with a MatchMakingRequest a "MatchFoundMessage" is sent to the matched players, a "MatchNotFoundMessage" is sent if not match is found. The FindMatchRequest doesn't send matched players a message when matched. Can you try it with a MatchMakingRequest and let me know how you get on ?


Thanks,

Liam

MatchMakingRequest worked perfectly.  Thanks for your help Liam.

Hi Ronan,


Glad to hear that worked for you, apologies again for the slow response, somehow your post managed to slip through the net, normally we would get these answered straight away.


Thanks,

Liam

Login to post a comment