I’m trying to prevent other players to do anything with an object that is not theirs. While I can block a lot of interactions via the onPlayerAction event, some interactions I cannot block via scripting yet. Some examples:
- Right clicking the object and showing the list of things someone could potentially do to the object. This does fire the event with id 13, but is not blockable for some reason.
- Searching a container
- Scaling the object by pressing the + and - keys by default. The weird thing is I can prevent the Up & Down scaling via the right click menu, but pressing the + and - keys doesn’t even trigger the event (and thus get’s bypassed). The general permissions menu scaling setting does not even block this behavior (I have it unchecked, yet players can still change scale with the + and - keys.
- Taking something out of a container. At the moment, I have to check ownership in this case and if not the owner, put it back. But it would me more elegant to be able to prevent taking it out in the first place.
I can disable scaling via an ugly on(Fixed)Update script, but that’s pretty intense for simply preventing players to do this. Adding it to the Actions list of onPlayerAction makes much more sense.
So the request is to enable a way to prevent any player action via script. The way I indicate ownership of objects is by tagging the relevant objects with the playercolors (e.g. “Red”, “Blue”, “Green”). When the playercolor who wants to do the action does not match the tag, I want to prevent the action.