> This is how i did it --
> Global Variable Timer.capx
Thank you korbaach and jeffige for the effort in doing a capx.
I really like what jeffige did, It almost what i am looking for a solution to my problem but as i said i have 2 sprites with 5 frames each, These frames changes randomly every 2 seconds.
Sir jeffige, You set the Timer >= to 2, if its true, then GameOver for the player and the player needs to restart the game again. But when the player touches the sprite you set it to 0 so that the action you gave to Timer will not trigger and the player continue to play the game.
But as i said, i have 2 sprites with 5 frames each. "Every 2 seconds" i set their animation frame to random(0,5). When the player touches these sprites i want the "Timer" set to what currently the seconds of the animation frame.
HOW CAN I DO THAT?
Please help, this is the last condition i want to implement to my game.
Your request is super confusing.
In order for it to make more sense, you should take every informations/capx you've already been provided and make a version of your game that is close to what you are looking for. And do provide your updated capx in order for others to be able to investigate easier what you are asking and what is going wrong.
In the absolute, you can set a numeric variable value to be equal to Sprite.animationframe; this will assign the number of the currently displayed animation frame as value of your variable. It sounds like this is what you are asking for ?
You speak of a timer, but did you implement it like in one of the provided capx ? Using a variable ? Using a timer ?
This is all confusing.