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.

3 years ago
1

A million times this please.

3 years ago
1
Changed the status to
Research
3 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
3 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.

3 years ago

Yes please

3 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…

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

3 years ago
J

@Eirikmun Yes, I could theoretically use the onUpdate event to compare the state of the last iteration to the new one. But as you said it’s ineffective, clunky and way too complicated. Also, as it runs every frame, it will eat CPU resources like cookies…
I want to catch the act of flipping something. Comparing new states to old states of up to a hundred objects (which is my use case) is not a solution here.

I don’t mean to attack you here, I’m just trying to clarify why that event will be helpful to me

3 years ago
1
B
Changed the status to
In Progress
3 years ago
1
B
Changed the status to
Planned
3 years ago
3

Hurrah!

3 years ago
B
Changed the status to
In Progress
3 years ago
1
Changed the status to
Completed
3 years ago
1

Tried onFlip and onObjectFlip. Nothing happens.

function onObjectFlip(a,b,c,d)
    print(a,b,c,d)
end
3 years ago

Had there been a patch yet? Pretty sure they need to patch that in first.

3 years ago