How do call SetSuspended(true) inside Construct workplace?

0 favourites
  • 7 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hello, i founded in forum how i can call SetSuspended function in game.

    c3_runtimeInterface._GetLocalRuntime().SetSuspended(true);
    

    But when i using minify mode as Advanced, _GetLocalRuntime function is renamed.

    I can use my own Function to call anything inside game, without renaming function after minify, but how i can call SetSuspended(true) and SetSuspended(false) inside Cosntruct workflow so i can create my own function?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't do this. You're using undocumented internals which are not supported and could permanently break at any time.

    You shouldn't need to manually suspend or resume the engine anyway. Construct handles that for you. If you want to do something like pause the game, set the time scale to 0 instead.

  • Don't do this. You're using undocumented internals which are not supported and could permanently break at any time.

    You shouldn't need to manually suspend or resume the engine anyway. Construct handles that for you. If you want to do something like pause the game, set the time scale to 0 instead.

    The problem with set time scale to 0, its sounds won't stop and it's continue playing while all game are freezing

  • So stop the audio too! Don't go hacking the engine just to perform tasks like this.

  • > Don't do this. You're using undocumented internals which are not supported and could permanently break at any time.

    >

    > You shouldn't need to manually suspend or resume the engine anyway. Construct handles that for you. If you want to do something like pause the game, set the time scale to 0 instead.

    The problem with set time scale to 0, its sounds won't stop and it's continue playing while all game are freezing

    As far as I remember, audio files imported as music will keep playing while imported as sounds will not. If I'm correct, you can just categorize your sounds based on this rule. (sadly Music streams if it's a web game)

    Alternatively you can set timescales for objects rather than the whole game (can use families of objects to be easier).

    I've tried many times and with the help of skymen and we couldn't figure out a consistent way of manually setting C3 to suspend and unsuspend.

  • > > Don't do this. You're using undocumented internals which are not supported and could permanently break at any time.

    > >

    > > You shouldn't need to manually suspend or resume the engine anyway. Construct handles that for you. If you want to do something like pause the game, set the time scale to 0 instead.

    >

    > The problem with set time scale to 0, its sounds won't stop and it's continue playing while all game are freezing

    As far as I remember, audio files imported as music will keep playing while imported as sounds will not. If I'm correct, you can just categorize your sounds based on this rule. (sadly Music streams if it's a web game)

    Alternatively you can set timescales for objects rather than the whole game (can use families of objects to be easier).

    I've tried many times and with the help of skymen and we couldn't figure out a consistent way of manually setting C3 to suspend and unsuspend.

    Thanks. I checked music and sound folder, it's same. Music don't stop when i change time scale to 0.

    Main problem when we using webkit on iOS, and you open new window or swiping between pages with pressed finger, your touch is freezing and you can't do anything with this.

    We want to manual suspend game before new window will open, and after reactivate game, when we return to game

    Video preview how you can reproduce this bug on iOS

    https://drive.google.com/file/d/1h1UORfQVlX4I0e65F2pjzKuF2KnNUAzy/view?usp=sharing

  • I don't see how changing when the suspend happens changes anything about what happens when it suspends. If you want to do something custom when the game suspends, use the system 'On suspended' trigger.

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