How do I pause?

0 favourites
  • 4 posts
From the Asset Store
Engage in an exciting and visually captivating Dice-themed game, featuring dynamic buttons, glowing spotlight effects.
  • I have sprites spawning off screen and coming on screen at the player.

    The event is basic and looks like this EveryTick >Sprite1> MoveForward -4 Pixels.

    Then another event that creates them off screen Every 1 Second>Spawner>Create Object>Sprite1.

    Works great every 1 second it spawns the sprite and the sprite moves through the screen.

    I get into the pause function, On Key Pressed >P>Set Time Scale 0.

    The spawning event stops spawning which is great, the player stops moving, but the Sprite1's that were already spawned keep on whizzing by. After looking through the forums I found a semi solution which is to put a bullet behavior on the sprites and get rid of the EveryTick event. If that is the best way to go about it I can change that. Just wondering if I'm missing something or if anyone happens to know why timescale would stop a bullet behavior, but not a system event, if that makes sense.

  • You could use something like sprite.X-4*dt*60 or use variable if paused.

  • I have used compare to global variable instead of the everytick condition.

    Hope the capx will help.

    note: the Wait 0 seconds action is very important

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the options. I ended up turning the sprites into bullets and setting their speed to 0 when I needed to pause. I wonder why the time scale doesn't work with the System events, Every Tick, Every X Seconds and so forth.

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