Pause

0 favourites
  • 8 posts
  • I want to create a pause, but you can not destroy anything while paused. I test rex pause, but if I give an item click this still active, I want that when you press any item not disappear.

  • This is more of an event issue. If you look at the FAQ it has a pause function on it.

    Ashley gives you a nice blurb from one of the tutorials on the site

    Delta-time and framerate independence Delta-time and framerate independence

    You can set the time scale to 0. This stops all motion. It's an easy way to pause the game. Set it back to 1 and the game will resume.

    You might notice you can still do things like shoot using the game controls. You can get around that by putting your main game events in a group, and activating/deactivating that group as you pause and unpause.

    Basically whatever events you have running that can still be clicked on and destroyed need to be in a group, or just place everything in a group and deactivate it on pause.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I do not understand what you mean ... I'm using the plugin scirra.com/forum/plugin-pause_topic46693.html I have to create a group? do not know how you do that xD

  • I'm not familiar with the plugin, but there seems to be (or you could create) a "paused" variable. You could add another condition to test against this variable to see if this is paused.

    The comment on grouping was to make this check against an entire group of conditions. But in your case, if there is only one event that you are trying to stop when the game is paused (such as destroying objects), you may be fine just adding the test to that one event.

  • 9 items are actually those who want to stop completely, but not to put in the event that clicking on the object is not destroyed.

  • I did this and it worked, when in pause could not destroy the object

    <img src="http://i46.tinypic.com/bfp99d.jpg" border="0" />

  • I am not on my proper PC now, so I can't test it, but You could create a sprite that covers all of your area (black background perhaps, or a semi transparent one) that will cover the sprites, so they can't be clicked while paused.

  • If is paused, create subevent "trigger once" then destroy to objects.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)