Hi Rafal,
This seems unusual, can you replicate this behaviour in the test harness and post the log please?
Thanks,
Oisin
Sure, I have attached two files with screenshots of my multiplayer challenge settings and test event settings.
I've created 2 new test users on FB page just in case something was wrong with my previous ones. I have no cloud code for any request, response, user messages or global messages. There is also no cloud code for test event or add multiplayer data event (I'm not using this one here, just set it in multiplayer challenge settings to simulate "proper" settings).
Here is what I'm doing in test harness, step by step.
Step 1:
Logging in both users using FacebookConnectRequest only. Both requests got positive response.
Step 2:
Create challenge request:
{ "@class": ".CreateChallengeRequest", "autoStartJoinedChallengeOnMaxPlayers": false, "challengeMessage": "", "challengeShortCode": "testChallenge", "endTime": "2016-03-15T14:15Z", "expiryTime": "2016-03-14T14:15Z", "maxAttempts": 0, "maxPlayers": 0, "minPlayers": 0, "silent": false, "usersToChallenge": [ "56deb1fc9f0f9404b539bbe7" ] }
And got response:
{ "@class": ".CreateChallengeResponse", "challengeInstanceId": "56deb2b218ead604a705837c" }
Step 3:
Got ChallengeIssuedMessage on second user:
{ "@class": ".ChallengeIssuedMessage", "messageId": "56deb2b218ead604a705837f", "notification": true, "summary": "Dave Alaaeggjcbehb Fergiesky just challenged you at Test Challenge.", "who": "Dave Alaaeggjcbehb Fergiesky", "challenge": { "accepted": [ { "externalIds": { "FB": "104102043319030" }, "name": "Dave Alaaeggjcbehb Fergiesky", "id": "56deb1d018ead604a7055569" } ], "challenged": [ { "externalIds": { "FB": "117833465276805" }, "name": "Richard Alaaejdeeibja Huiberg", "id": "56deb1fc9f0f9404b539bbe7" } ], "challenger": { "externalIds": { "FB": "104102043319030" }, "name": "Dave Alaaeggjcbehb Fergiesky", "id": "56deb1d018ead604a7055569" }, "expiryDate": "2016-03-14T14:15Z", "maxTurns": 0, "turnCount": { "56deb1d018ead604a7055569": 0 }, "shortCode": "testChallenge", "scriptData": {}, "challengeName": "Test Challenge", "endDate": "2016-03-15T14:15Z", "challengeId": "56deb2b218ead604a705837c", "state": "ISSUED" }, "playerId": "56deb1fc9f0f9404b539bbe7" }
So I accept it using:
{ "@class": ".AcceptChallengeRequest", "challengeInstanceId": "56deb2b218ead604a705837c", "message": "" }
Got this in response:
{ "@class": ".AcceptChallengeResponse", "challengeInstanceId": "56deb2b218ead604a705837c" }
{ "@class": ".ChallengeStartedMessage", "messageId": "56deb2bf9f0f9404b539e06a", "notification": true, "summary": "Test Challenge is good to go.", "challenge": { "challengeId": "56deb2b218ead604a705837c", "scriptData": {}, "shortCode": "testChallenge", "nextPlayer": "56deb1d018ead604a7055569", "maxTurns": 0, "turnCount": { "56deb1d018ead604a7055569": 0, "56deb1fc9f0f9404b539bbe7": 0 }, "startDate": "2016-03-08T11:08Z", "accepted": [ { "externalIds": { "FB": "104102043319030" }, "name": "Dave Alaaeggjcbehb Fergiesky", "id": "56deb1d018ead604a7055569" }, { "externalIds": { "FB": "117833465276805" }, "name": "Richard Alaaejdeeibja Huiberg", "id": "56deb1fc9f0f9404b539bbe7" } ], "challenged": [ { "externalIds": { "FB": "117833465276805" }, "name": "Richard Alaaejdeeibja Huiberg", "id": "56deb1fc9f0f9404b539bbe7" } ], "challenger": { "externalIds": { "FB": "104102043319030" }, "name": "Dave Alaaeggjcbehb Fergiesky", "id": "56deb1d018ead604a7055569" }, "expiryDate": "2016-03-14T14:15Z", "endDate": "2016-03-15T14:15Z", "challengeName": "Test Challenge", "state": "RUNNING" }, "playerId": "56deb1fc9f0f9404b539bbe7" }
Step 4:
Turns out challenger got first turn, so I'm back to my first player and do this:
{ "@class": ".LogChallengeEventRequest", "eventKey": "testEvent", "challengeInstanceId": "56deb2b218ead604a705837c" }
Getting this response:
{ "@class": ".ChallengeTurnTakenMessage", "messageId": "56deb2d418ead604a7058ce3", "notification": true, "summary": "Dave Alaaeggjcbehb Fergiesky has taken their turn.", "who": "Dave Alaaeggjcbehb Fergiesky", "challenge": { "startDate": "2016-03-08T11:08Z", "accepted": [ { "externalIds": { "FB": "104102043319030" }, "name": "Dave Alaaeggjcbehb Fergiesky", "id": "56deb1d018ead604a7055569" }, { "externalIds": { "FB": "117833465276805" }, "name": "Richard Alaaejdeeibja Huiberg", "id": "56deb1fc9f0f9404b539bbe7" } ], "challenged": [ { "externalIds": { "FB": "117833465276805" }, "name": "Richard Alaaejdeeibja Huiberg", "id": "56deb1fc9f0f9404b539bbe7" } ], "challenger": { "externalIds": { "FB": "104102043319030" }, "name": "Dave Alaaeggjcbehb Fergiesky", "id": "56deb1d018ead604a7055569" }, "expiryDate": "2016-03-14T14:15Z", "nextPlayer": "56deb1d018ead604a7055569", "maxTurns": 0, "turnCount": { "56deb1d018ead604a7055569": 0, "56deb1fc9f0f9404b539bbe7": 0 }, "shortCode": "testChallenge", "scriptData": {}, "challengeName": "Test Challenge", "endDate": "2016-03-15T14:15Z", "challengeId": "56deb2b218ead604a705837c", "state": "RUNNING" }, "playerId": "56deb1d018ead604a7055569" }
{ "@class": ".LogChallengeEventResponse" }
Step 5:
Second player is getting the same ChallengeTurnTakenMessage, but when I try to do this:
{ "@class": ".LogChallengeEventRequest", "eventKey": "testEvent", "challengeInstanceId": "56deb2b218ead604a705837c" }
I'm getting this response:
{ "@class": ".LogChallengeEventResponse", "error": { "challengeInstanceId": "NOT_YOUR_TURN" } }
Right now all I have is testEvent and testChallenge because I was preparing clean example in test harness for Oisin. You can find them in game "... - separate FB test". I have removed my previous code entirely and I'm currently working with only one LogChallengeEvent as a workaround (that is even better than my original solution) for this issue.
I am also having this problem, did you ever figure it out?
Unfortunatelly no, I just figured out a way to use only one LogChallengeEvent in my game that actually should "take turn" so I'm avoiding this issue. I can imagine that's not possible in every game though.
I'm also having the exact same problem. Has anyone solved it?
Support told me this: "When a LogChallengeEvent is called, the ChallengeTurnTakenMessge will be sent to all players in the challenge"
I thought "who" was broken, but from your logs, I see it's the display name; shouldn't it be the player's Id?
could we disable sending a ChallengeTurnTakenMessage after each LogChallengeEventRequest ?
since:
1- it counts towards the limited quota of monthly requests/responses per player
2- it is going to be called for each custom request and is useless unless I want it to be called ( I need it for only 1/4 of the custom requests )
If there's a way to disable it, please let me know, if not, please add a flag or something to disable automatically sending it.
Yo please I need this resolved asap..
It's actually detrimental to my logic, not just useless.
I'm in a crossroad now, and it's gonna be hard to switch later, I need to disable the call to ChallengeTurnTakenMessage on every LogChallengeEventRequest.
I'm controlling when turns are consumed just fine, I want this to be only called when I actually consume a turn.
Hi,
You can turn off a message in the message tab on the portal. Below I've clicked into the ChallengeTurnTakenMessage and turned off "Send Via Socket" and "Send As Push" to stop the message being sent.
Does this sound like it will work for you ? If you have any further questions just let us know.
Thanks,
Liam
OK, this might work, but then I have to make a custom message to send when taking turns, is that what I am supposed to do after disabling this message?
In the end, I only need to disable the auto-call on this message, I actually need the method, but only when a turn is consumed via Challenge.consumeTurn(), and not after every custom event. the challenge object embedded in this call was pretty useful.
I had an ugly solution, which was "dismiss the message as soon as it's created and only call it when a flag (stored in the challenge data) is true", but I was looking for a cleaner one.
Anyway, I think this solution seems cleaner than the one above.
EDIT: wait, does this still create the message, only it does not send it ? having the playerMessages collection get populated with useless messages isn't desirable either, I just wish there was a flag to make a custom event silent or sth.
Thanks Liam
I wish there was an edit button for posts on this site, I keep deleting/reposting to make minor spelling/styling changes
No good :(
it actually does create the message and executes all the code inside, but yeah, it does not send it. which is not what I want
well, ugly solution it is...
Rafal Szekalski
Hello
I'm receiving ChallengeTurnTakenMessage after each LogChallengeEventRequest I send. They are not actually consuming player turn unless I send this one, particular LogChallengeEventRequest that I have set as "Turn / Attempt Consumers" in my multiplayer challenge settings. I can live with that and write code that will work in that case, but gettings those messages seems counter-intuitive to me. Is that a right behaviour or maybe mistake is somewhere on my side?
Simple example, in case I was not clear enough:
- I have a multiplayer challenge called "testChallenge" that takes "takeTurn" event to consume player turn. Challenge is turn-based obviously.
- I have two events: "takeTurn" and "uselessEvent".
- I'm invoking event "uselessEvent". GS sends me a ChallengeTurnTakenMessage and turn is not consumed. I can still send requests using this player and get more ChallengeTurnTakenMessages.
- I'm invoking event "takeTurn". GS sends me a ChallengeTurnTakenMessage and turn is consumed. I cannot do anything more on this player.
5 people have this question