new events that can be hooked into and even cancelled on a per-object basis.
additionally, if tryPickup would work on locked objects too, this would let us have objects as buttons.
Of course this would make the default return not locked
so locked objects would not be picked up by default and unlocked objects would, as currently exists.
well, if you return false from the tryPickup
essentialy, the object would never be pickep up, so it doesn;t need to be locked to function as a button
trySelect is possible by switching the appropriate toggle in a specific zone.
tryPickup is possible by switching “Lock” toggle in a specific zone.
trySelect and tryPickup seems very hacky and complicated. I don’t think we really need this. And I assume questions like: Why I can’t pick up objects? They aren’t locked! It’s a bug!
@Star
incorrect. onPickup is not fired when you try to pick up a locked object. And there is no onSelect function to hook into.
@ThatRobHuman
But I assume that selecting itself is my business. Scripts shouldn’t know or deal with my choice until I try to do something real (pick up, move, delete, etc).
I’m not seeing a direct use-case for trySelect yet. But tryPickup
can be used to prevent players who’s turns it’s not to interact with certain things, or to make player pieces only movable by that player (in addition to the aformentioned button functionality).
direct use-case for trySelect?this would let us have objects as buttons
arguably just having an onClick
event for game objects would be a workable alternative.