transition Pause

I need to pause the game, and all of the transitions that are happening. I also need to resume them If you post a code please explain it because I am a beginner. Ive read some posts on how to do it, but for some reason nothing worked. I have worked out how to pause everything except for the transitions. I only have “transition.to”

Thanks! [import]uid: 104376 topic_id: 22088 reply_id: 322088[/import]

There isn’t a built in pause, however there is some sample code that works well for this;
http://developer.anscamobile.com/code/pausable-timers-and-transitions-speed-adjustment

:slight_smile: [import]uid: 52491 topic_id: 22088 reply_id: 87789[/import]

What do you mean? [import]uid: 104376 topic_id: 22088 reply_id: 87794[/import]

Transition.to() cannot be paused; there is no transition.pause.

You can either cancel the transition and then do a new transition to give it the appearance of pausing and resuming or you can look at the link above which has sample code submitted by a community member that will allow you to pause transitions. (Some things are supported using third party classes when they do not have their own APIs.)

Is that easier to understand? I’m not sure what part is confusing but if you can tell me I can try to explain it more thoroughly for you :slight_smile: [import]uid: 52491 topic_id: 22088 reply_id: 87815[/import]

Ok, now I get it. I will try the link again, even though I tried that method before, and it didn’t work. [import]uid: 104376 topic_id: 22088 reply_id: 87819[/import]

Sometimes it is trial and error; you can always comment on the page linked to above with the issue you are having and the creator of the code may be able to assist :slight_smile: [import]uid: 52491 topic_id: 22088 reply_id: 87987[/import]

Okay, I’ll try. Do you know other ways of moving objects from the top of the screen to the bottom without using transition.to or Gravity? [import]uid: 104376 topic_id: 22088 reply_id: 87995[/import]

You could applyForce, applyLinearImpulse, applyLinearVelocity or, if not using physical bodies, have a Runtime listener that moves the object in question down one pixel per frame. (Although that isn’t the most efficient.) [import]uid: 52491 topic_id: 22088 reply_id: 88050[/import]

applyLinearImpulse works great! Thanks! [import]uid: 104376 topic_id: 22088 reply_id: 88226[/import]

Glad to hear it, best of luck with your project :slight_smile: [import]uid: 52491 topic_id: 22088 reply_id: 88277[/import]