I'm still improving the pong tutorial.
Press P = Stop paddles and pause the ball movement
Appears a "Game Paused" image from top with a "bouncing ball" movement with deceleration to stop in the top-midle of the frame
Press P again:
"Game Paused" vissibility is off, paddles can be moved and the ball continues with the previous speed and acceleration
What i made:
Upon Pressing "P" = "Game Paused" Toggle internal flag 0
"Game Paused": Internal Flag 0 is On: Stop Ball | set 0 authorised directions to padles movement | Game Paused reapear and Star Movement
"Game Paused": Internal Flag 0 is Off / Only one action when event loops: Start Ball and set X Speed | set the up/down authorised directions to padles movement | Game Paused make invisible and set original position
Notes: A timer with set speed "Speed( "Ball 10" )+2" is running for the ball aceleration.
First problem: The "Game Paused" appears well the first moment but the second time not move. I Know i need to restart the movement but i not find this option or how to do this.
Second Problem: When the "game paused" image go out i set a speed to the ball because i don't know how to set the previous speed+acceleration before the game was paused.
The solution for the ball problem i suppose will be "pause ball" instead "stop ball" but in the movement options only appears Start and Stop.
Other thing i tried is:
flash is Off - Set "Next Movement = Static" and when the flash is On "Previous Movement = Bouncing ball" but with the default step not with the speed+aceleration before the game is paused mmmm i need to get the speed before the game is paused and set it when the flag is on mmmm
Thanks in advance.
I tried one possible solution for the ball problem:
Create an object called "speed ball"
When P is pressed retrieve the speed from "Ball" to "Speed Ball"
Flag On = Stop "ball"
Flag Off = Retrieve the speed from "Speed ball"
But either works.... i think this is one solution but something is wrong in the conditions/expresions mmmm....
Found a solution for the Game paused problem:
"Game Paused": Internal Flag 0 is On: Stop Ball | set 0 authorised directions to padles movement | Game Paused reapear, Select Movement 1 and Start.
With this always select the initial movement and plays it!
Now, need to solve the ball speed+acceleration...