evoGUI icon indicating copy to clipboard operation
evoGUI copied to clipboard

Change remote.call() inputs for sensor plugins multiplayer compatible

Open FuryoftheStars opened this issue 4 years ago • 0 comments

I could be wrong, but from what I can tell, adding a sensor to your mod via the remote.call doesn't appear to be multiplayer friendly. It won't crash anything, but it doesn't allow for separate sensors for separate players.

Specific case: I've created a mod that varies the wind speed on a per surface basis. I'm adding a built in sensor plugin to go with your mod, however, because remote.call() doesn't seem to take a player index input, I see no way to update the sensor info on a per player basis in case one player is on one surface while another is on a different surface. As such, I either 1) create 1 sensor that gets its display output from only one player or is overwritten by whoever the last player in sequence is, or 2) create separate sensors for each player that I can then update with their own info, but then all sensors are visible to all players.

If remote.call() can be updated to take a player index argument, and then on your side use this to display the sensor only to that specified player, on the plugin side we can create separate sensors for each player, and then update their specific sensors with the data relevant to them. Null input to this player index field can be seen as current behavior where it creates and updates the same sensor for all (this will allow the global functionality for those sensors where it makes sense, and not break compatibility for already existing mods).

FuryoftheStars avatar Nov 09 '21 16:11 FuryoftheStars