Hi everyone! I'm trying to build a drag-and-drop system in Construct 2 where coins can be stacked visually and counted logically.
Here’s what I want to achieve:
When the player drags one coin sprite and drops it on top of another coin of the same type, the system should:
Add +1 to a variable (e.g., CoinCount) on the receiving coin.
Change the animation frame to visually represent the stack (e.g., 2 coins, 3 coins, etc.).
Continue updating the count even after the frame reaches the maximum (frame 5), but stop changing the frame beyond that point.
So for example:
Frame 0 = 1 coin
Frame 1 = 2 coins
Frame 2 = 3 coins
Frame 3 = 4 coins
Frame 4 = 5 coins
Frame stays at 4 even if CoinCount goes beyond 5
The dropped coin should be destroyed after stacking, and only the receiving coin should update.
I’ve tried using On DragDrop drop, Is overlapping, and Pick nearest, but I’m struggling to get the picking and frame logic working correctly.
If anyone has a working example or can guide me through the correct event structure, I’d be super grateful!
Thanks in advance 🙏