
Similiar to ‘onObjectPeek’ or ‘onObjectPickUp’, add ‘onFlip’ events which fire when an object is flipped (eg. selecting an object and pressing “F”).
Being able to return true or false to allow/disallow the flip would be very useful as well.

A million times this please.


– Recipe for modders & devs ;)
local function isOpen(obj) --for cards, tiles, etc
local rot = obj.getRotation()
return (rot.z < 90 or rot.z > 270)
end
@Star I don’t want to know whether an object is flipped or not, I want to know if a player clicks “flip” on an object - which player it is, and additionally, control whether that player is allowed to flip the object in the first place.

Yes please
I’m also asking for this. I’m creating a mod with some similarity to “Memory” (the kids game) and onFlip would make that one immensely easier to user. Right now I have to put a button on each tile…

@Janschmitte that is possible to achieve using the onUpdate event as noted above. It’s just ineffective and complicated compared to adding a New event. I can’t imagine it being very complicated to add.

If this exists now (and is released) can the docs be updated?

So was this actually completed? It’s not in the docs anywhere.




We added this with the player actions feature
https://api.tabletopsimulator.com/events/#onplayeraction-actions


Thanks for the update Knil. I still think a simple ‘onObjectFlip’ would be better but thanks for digging into it. I appreciate all that you and your team do. <3