Sorry, we don't support your browser.  Install a modern browser
This post is closed.

Add 'onFlip' and 'onObjectFlip' events#69

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.

5 years ago
1

A million times this please.

5 years ago
1
Changed the status to
Research
5 years ago

– 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
5 years ago

@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.

5 years ago

Yes please

5 years ago
J

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…

5 years ago

@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.

5 years ago

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

2 years ago

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

5 months ago
Changed the status to
Research
5 months ago
Changed the status to
Research
5 months ago
Changed the status to
Revisit
5 months ago
1

We added this with the player actions feature

https://api.tabletopsimulator.com/events/#onplayeraction-actions

5 months ago
1
Changed the status to
Completed
5 months ago

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

5 months ago