How to use in code view model triggers that fire after a tap?
Hi,
I’ve created a grid of cards, view model triggers, a view model number item, and listeners to track taps on the cards. If card 1 is tapped then a listener (that listens to a tap on the card 1 hitbox) applies value 1 to the view model number item and additionally fires view model trigger for the first card, and also reports to an event. The same goes for each card. If emptiness between cards is hit then the tap trigger fires and the number value goes zero. These were a couple of alternative options for the developer to use in code (for him to see the moment of the tap on a certain card and to use it for further actions in the app/website). But he ended up with using only number value. He wasn't able to use view model triggers and the event to track the taps.
So my question is how to use them? I know nothing about code, but he described his work with the Rive file like this:
The developer had difficulty understanding which event in the Rive to listen to in order to track the click event.
The developer assigned a standard browser click or tap event on the canvas and listened for the moment of the click within the event that triggered your inputs.
Please advise on how to do it correctly.
Thanks.