Sign In Register

How can we help you today?

Start a new topic
Answered

Change another players event data

Hello, I'm trying to make it so one person is able to change a value in someone else's event attribute.  I am able to retrieve all the players information and get their specified value but is there a way to change effect that info?


I am able to retrieve the players userid and all the unique attributes made.


Doing a LogEventRequest for that event only changes the current user's info.  Is there a method/function that I should be using?


Best Answer

Hi Orrin,


What you could do is when the host starts a game, generate that number then store it in a custom collection using the hosts playerID as the document ID, then any player that joins after that can simply find that number by using the hosts playerID in that collection in the Cloud Code for their event, grabbing that number and using it as the number in their event attribute. If you need any more help just let me know.


Thanks,

Liam



Hi Orrin,


Some more details here would be great. What sort of game is it ? Are the players here engaged in a challenge ? What sort of attributes are you looking to pass between players ?


Thanks,

Liam

They will not be engaged in a challenge, the attribute would be a random number that is assigned at the beginning of the game.  That number is assigned once the host starts the game depending on how many players there are and it will assign them a number so each player can be assigned into groups.  So the only attribute that would need to be changed would be a number attribute.

Answer

Hi Orrin,


What you could do is when the host starts a game, generate that number then store it in a custom collection using the hosts playerID as the document ID, then any player that joins after that can simply find that number by using the hosts playerID in that collection in the Cloud Code for their event, grabbing that number and using it as the number in their event attribute. If you need any more help just let me know.


Thanks,

Liam


Login to post a comment