Accessing time scale via scripts

0 favourites
  • 4 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • I did a search and saw a topic from 3 years ago asking this same question. I love Construct, but I really need to be able to do as much with JS as possible so that I can quickly reuse bits of code that are common across games.

    One example is simply pausing the game and having a menu pop-up. Every game has this and I'd love to build a script that I can just import to enable this functionality.

    From my research though it doesn't seem to be in the scripting docs.

    Any particular reason for omitting this functionality? Or is it there and I am just not understanding how to do something like set the timescale = 0 at the system level via scripts?

    Tagged:

  • My understanding is that time scale functions are not accessible via the scripting interface in Construct. I am new to the software and unsure why that is the case. However, a workaround for this limitation is to use event sheet functions that can be called from script files. Here's an example:

    runtime.callFunction('PauseTimeScale')

  • Update: This workaround is no longer needed! r338 added the timeScale property and restoreTimeScale method to the scripting API.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So f***ing awesome!!!

    Ashley, you are the GOAT!

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