Pausing without Timescale

This forum is currently in read-only mode.
From the Asset Store
In this template the music plays without looping in your game
  • So here's the deal, whenever my player touches an item, I need the player and all enemies/bullets to freeze. But then I need specific sounds to play with specific timing. Is there anyway to pause the action onscreen without pausing events using timedelta, ie every X milliseconds...

    it should go something like this...

    if player collides with item then

        pause onscreen action

        wait x amount of time

        play sound

        unpause onscreen action

    any ideas guys?

  • Variable 1 = 0

    Always set variable2 to (edit)timedelta.

    Variable 1=1

    Always set variable2 to 0

    Always set movement blah, blah *variable2

    Using globals, or private variables....

    Edit:

    Whoops replaced timescale with timedelta.

  • I don't know if it helps in this situation (I'm not sure if I fully understood the issue), but you can always have audio being unaffected by timescale (Properties/Timescale audio)

    Also I made an example of staying time-based (and keeping a few things running, e.g an audio fade) while Timescale = 0 in "Verve!", an example game. You can find it in the examples & tutorials section.

    But again, not sure if it helps in this specific case.

  • what I wound up doing was to create a variable for "Action Pause", and I'm know just having to retro fit all of the appropriate code with it, so that...

    if "Action Pause" = 0 then

    execute AI and Behvaviours

    elseis "Action Pause" = 1 then

    do absolutely nothing

    lol that way I can have "every X milliseconds" counters reset "Action Pause" back to 0 to resume the game instead of having to wait for the player to press a key or something.

  • If only there was a way to deactivate certain objects... like turning off a switch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • and my fix failed miserably... <img src="smileys/smiley19.gif" border="0" align="middle" />

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