Jump to content

Suggestion: Use stackable onPlayerConnected/onPlayerDisconnected commands


Face

Recommended Posts

This is a request to the Epoch devs to switch from using the old, nonstackable "onPlayerConnected" and "onPlayerDisconnected" to the new stackable versions introduced in Arma 3. More information here: (https://community.bistudio.com/wiki/BIS_fnc_addStackedEventHandler)

 

The primary reason for suggesting this change is stackability of the commands. Using the old unstackable commands leaves them vulnerable to being overwritten by subsequent uses of the respective commands (for example, from a 3rd party script), which can potentially cause issues. For example, overwriting of the Epoch onPlayerDisconnected-called script would prevent player character info from being saved to the hive.

 

The secondary reason is to allow more flexibility for future script writers. The onPlayerConnected script command is very useful for cases where scripts need to be executed serverside for each newly connecting player without resorting to shooting public variables between server and clients. Unfortunately, the stackable eventhandlers can't be used if the non-stacked version of the command has already been called.

 

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...