How to know if the user leaves a MMORoom from the Client

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Tenzoru
Posts: 4
Joined: 02 Sep 2021, 09:00

How to know if the user leaves a MMORoom from the Client

Postby Tenzoru » 19 Sep 2021, 19:42

Hello,

I'm using MMORooms. And from the Serverside extension, i'm using the sfsApi.LeaveRoom() method to make the playing user leave a room.

The problem is that MMORooms don't trigger the USER_LEAVE_ROOM event. So, my question is:
If i'm leaving the room from the server extension, how can the client know that he left the room? Is there any other event fired? Or should I send the client a custom message from the server?

Thanks in advance
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to know if the user leaves a MMORoom from the Client

Postby Lapo » 20 Sep 2021, 15:20

Hi,
yes in the specific case where the "leave" is triggered from server side, and the client needs to be notified, you could send an Extension event back to the player.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 62 guests