My goal was to create 25 sprites, in 5 groups.
So I created a function to loop the creation of a sprite 5 times. I have 5 sprites, looped 5 times = 25.
Great!
Now how to control them afterwards? I saved the Component ID as a variable and as you can see in the picture, used that varible. It works! Obviouly only the last created sprite did anything but it proved that Component ID is usable.
Hi there,
I want to, use this feature, but the list is a vatiable, and thats does not seem to work.
I set the variable like this:
and want to use it like this:
The sprite (which should be “Schijf1” - and it reads that way), but it doesn’t move.
When I use the name of the Sprite directly, it works fine.
Please help!
Thanks in advance and a very Thunkable new year!!
Remove the “app variable block” right before the “join” block. Your list is called Paal1 but you’re currently trying to access a list with the name stored in a variable called Paal1. You simply want the list called Paal1.
What you are suggesting is what I first tryed, but that does’t work. It seems not possible to address a listname directly via a join.
The goal is that you touch a pole (paal1, 2 or 3), which becomes the “PoleFrom” (PaalVan variable)
Next, you touch anoyher pole, which becomes the “PoleTo” (PaalNaar).
The top disc (schijf) now moves from PaalVan to PaalNaar.
The moving works fine, the problem is the logic with the poles.
This is the app where only the moving is done with 1 disc only (with debugging output).
The problem has been solved.
Here is how: Create a list of the sprites
Then, each sprite can be referenced as follows:
Thunkable uses the internal ID as a reference if you do it this way.
The only concern is that the sprites have to be in the right sequence in your design.