Hi community!
I think I can you explain it the best when I "convert" my needs into a garden. First off a sketch from my situation (ignore everything drawn in brown at first):
(you may have to view full image, its a bit bigger)
You got 4 flowerpots. Its the sprite "sprite_flowers" [green things in image=the sprite // the number beside each sprite represents its animation (which ll contain frames, but thats not important for now]. Those 4 pots are placed at a fixed position.
In this example we have 3 different seeds. Everyone of them takes another time to grow. Flowerpot #1is empty, #2, #3 and #4 are not.
60 seconds after you tapped the seed and planted it into pot #2, the flower will be full grown.
#3 will be set at animation 3 after 40 seconds and after another 80s it will be set to 4.
Same with pot #4, except that it contains 3 states untill it is grown.
What I need to know:
The "selection" what goes where is asked In a:
{Touch > on touched sprite_flowers
{ sprite_flowers > is animation "empty" playing
{ sprite_flowers set animation to state1 }}}[/code:3d2wmo7a]
This is stored in a group which is activated after selecting the flower you want to grow and deselected after successful placing.
What do I have to do to start a timer which is started when the touch "on empty pot" is done (I wanted to make an array containing informations about the flowers, especially the "growtime") pointing at the sprite I selected? I messed arround in hoping with "is touched" element to store information about what is pressed to give it a "unique" ID or something for letting the timer point at it, but it doesnt even worked a little as wished.
Regards,
Proxymity
Edit: I thought about making 4 different sprites, all containing the same animations but It ll be a bit easyer to manage the state and things, but I dont know if adding them to a container could be reduce the sourcex4 (with 4 sprites) to a single one. Inheritance is possible with families but is it also possible to really reduce the sourcecode to a "single" function/event/group making it valid for all 4 sprites?