Match handler and send/receive match data

Hi,

I’m using Match Handler API to get users into match but it seems when I send state via client, it does not work (when i’m not using match hander, it works).

My client code:
https://paste.ofcode.org/ZrHsEd4xvzVDsZEd6HFRfJ

My server side code:
https://paste.ofcode.org/33SQdHVMWaaDA4Zgy5QUMph

Thanks

I see there is a messages property in match_loop handler.

Is there another way to process messages?

You aren’t sending any data to the participants of the match in MatchLoop function.

In server-authoritative multiplayer mode, you are responsible for sending messages to selected/all participants of a match. This could simply be relaying all received messages (discouraged), or sending a “summary” of all received messages in a tick.

Please study the documentation as it tells you more about server-authoritative multiplayer:

https://heroiclabs.com/docs/gameplay-multiplayer-server-multiplayer/#go-runtime

1 Like