Hi guys,
following my situation:
I would like to add an event in which, when I touch after the first time, before creating other random objects, it destroys the ones created previously. How can I do this?
Here is what I have done.
https://drive.google.com/file/d/1jV2HO8ZiJ3i07_x31O3q9RWY9kyBt7Tb/view?usp=sharing
I made it so that when you click the button, it will call a function to delete the previous things, wait 0.0001 (or something like that), and then create new cards. The problem with the code you uploaded was that it would have the old cards underneath, so if there was a link, it would try to take you to all of the previous card links at once. I also added a ripple effect (or 3) so the user can tell when the hit the button, you can choose which one you like best, just make sure when you change it, you set it to start at the last frame (so it won't start before the user clicks the button). If you don't like any of the animations, then you can just change it back to the regular button.
I'd also suggest, that you push all the different pictures into one card, then just change the animation to a random one. That way, if you don't have the full version, you can save events.
Start by adding a instant variable, that is named, "GoTo" and have the system change the variable on the card depending on the name of the animation. Then all you need to do is add a event, "Mouse - On Object Clicked - Cards -- System - Go to layout (by name) - [Name_Of_Cards].GoTo"
also, "System - Every Tick -- Cards set value - GoTo - Cards.AnimationName
Note:For the instructions above, you can replace "Cards" With whatever you want the name of the cards to be. You also would need to have the layouts named 1, 2, and 3. The animation names would also need to be 1, 2, and 3. (Eg. Naruto's animation would be 1.)
Updated File: https://drive.google.com/file/d/1QAoAPzNon6soLiAp4hL71q0RCyX5doKI/view?usp=sharing