Is "Disable system event" available?

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

Moderators: Lapo, Bax

darkengine
Posts: 3
Joined: 14 Apr 2017, 08:08

Is "Disable system event" available?

Postby darkengine » 14 Apr 2017, 08:15

HI, we're with sfs2x 2.12.0 and we do not need to handle "user count change" event wihin our game. And, this event will fires when any user join or leave any rooms so we want to disable it. However, we find that the setting text area is not available in AdminTool and edit the xml configuration file for zone will lead to failure to start server. Finally we find these line on doc:
"Additional informations
Disabled system events list is not yet implemented."

So I just wonder that if this feature implemented or not in the latest version?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Is "Disable system event" available?

Postby Lapo » 14 Apr 2017, 10:01

Hi,
the "User Count Change" event can be throttled so that it fires less often while still maintaining all Room counts properly synchronized.

By default the throttling is set to 1 second, meaning that even if Room counters change multiple times per second the updates will fire only once a second, thus avoiding excessive updates.

You can fine tune this value to what you want, maybe 3-4 seconds if you want even less updates. You find it under AdminTool > Zone Configurator > "Advanced" tab

You can also disable the event entirely from AdminTool > ZoneConfigurator, then choose your Room and under "Permissions and Events" you can remove the USER_COUNT_CHANGE label.

See here for more:
http://docs2x.smartfoxserver.com/Gettin ... rator-room

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
darkengine
Posts: 3
Joined: 14 Apr 2017, 08:08

Re: Is "Disable system event" available?

Postby darkengine » 24 Apr 2017, 15:28

Thx for replying. So the USER_COUNT_CHANGE event can only be blocked in room scope, right? Our game rooms are created dynamically hence it's not possible to change the setting for every room with AdminTool. We decide to modify the throttling at last.

Lapo wrote:Hi,
the "User Count Change" event can be throttled so that it fires less often while still maintaining all Room counts properly synchronized.

By default the throttling is set to 1 second, meaning that even if Room counters change multiple times per second the updates will fire only once a second, thus avoiding excessive updates.

You can fine tune this value to what you want, maybe 3-4 seconds if you want even less updates. You find it under AdminTool > Zone Configurator > "Advanced" tab

You can also disable the event entirely from AdminTool > ZoneConfigurator, then choose your Room and under "Permissions and Events" you can remove the USER_COUNT_CHANGE label.

See here for more:
http://docs2x.smartfoxserver.com/Gettin ... rator-room

Hope it helps
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Is "Disable system event" available?

Postby Lapo » 25 Apr 2017, 06:55

darkengine wrote:Thx for replying. So the USER_COUNT_CHANGE event can only be blocked in room scope, right? Our game rooms are created dynamically hence it's not possible to change the setting for every room with AdminTool. We decide to modify the throttling at last.

Keep in mind that dynamic Rooms can also be fully configured in terms of events, just like with the AdminTool. Only you do it via server-side code, instead of visual UI.

When creating a Room from server side you can specify a set of RoomSettings where you can specify which events are on/off in the Room. For more details check the javadoc here:
http://docs2x.smartfoxserver.com/api-do ... tings.html

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 52 guests