its possible to store the movement of a ball in tinydb getting the x,y coordinates and next. reproduce this movement stored in tinydb ?.
Yes, use a list of pairs (x,y).
To replay, use a clock timer and run down the list.
No, I will not code this for you.
i know that you need to assign a tag name but how can i make to automatic assign every tag for every x and y value from ball
why do you need a different tag each time? why not use the same tag where the value is the list of coordinates? (the global list coodenadas). so, when later you want to recover the list of coordinates, you only have to recover one tag, with the list of al the coordinates.
If you want to store the timing of the Ball movements, Clock1.SystemTime makes a wonderful tag for a single observation (x,y)
because i know that the tag only save 1 value for tag, bit i ' ll try your suggestion
No, the tinydb tag can also store a list.
Storing the Ball x,y:
Clock1.Timer
set local variable myRoute to TinyDB tag 'MYBALLROUTE' value default (create empty list)
add item (make a list (Ball1.X, Ball1.Y)) to list myRoute
store local variable myRoute to TinyDB tag 'MYBALLROUTE'
i have a problem when i try to play the tag values stored from tinydb. i dont know why is my error but dont reproduce every list of coordinates x,y stored in tinydb
proyectoanimacion.aia (3.7 KB)
Ball1.MoveToPoint does not accept a list of points.
See its tool tip.
how can set to the ball the tag values stored? please help or some hints
maybe using select item from the list of tinydb?. but how can make that to reproduce the all values x using select item of the list?. maybe using other timer? or its no neccesary using other timer for reproduce the list tagc tinydb ?
proyectoanimacion (1).aia (4.3 KB)
You need a second clock Timer for playing, in addition to the Clock Timer you use for recording.