When it kinda works

Screen

Finished my test animation and made a video with test controls. She runs, she jumps and she stops!

Looks like it all works but… it actually doesn’t.

Run into trouble with transition.pause(). It took me pointless hours of changing code — and after creating a new simple project to test it, I can say — it is the problem with Corona’s built-in function, and not with my code.

As you can see on the video, character can run and stop, and jump and stop. But if you use controls to jump, run and then stop — transition.pause() won’t work.

The example from my simple project:

We have a background transitioning to the left.

A static object (or sprite).

Set of controls triggering events

Listeners that catch events, pause or resume background transition, and call a function that changes the position of the static object.

Problem: transition.pause() doesn’t work if you resumed it more than once before. Though if you do catch event with transition.pause() 2 times — it will pause, as if it stops resume 1 and than stops resume 2.

Google doesn’t know what to do with this. I don’t know either.

Luckily for me, in my game user won’t ever get a chance to use “stop” control — all scenes where character stops are script-driven. But still, it would be nice to know how the hell I can fix that 8(((