-
Notifications
You must be signed in to change notification settings - Fork 0
Module Sys
Sys is a module that contains SCI's core feature ("Sys" being short for "System"). Likely the most required module in all of SCI.
Overview of the functions that come with "Libs/SCI/Sys"
Contains the name of the state from which this is called
Continues the current MainFlow call, but won't start a new frame/cycle but exit SCI. Contrary to Lua's os.exit it does close all processes and unloads all loaded assets before quitting.
Alias for Sys.Exit
Once the current frame is complete it will start the new frame in the different flow.
Loads a script into a new flow. Script files can be either lua source scripts or byte code.
Loads a script into a new flow, but only when no flow already exists in the FlowName.
Loads a script into a new state. Script files can be either lua source scripts or byte code.
Loads a script into a new state, but only when no flow already exists in the FlowName.
Alias for Sys.LoadNewState
Open the requested URL into the default browser.
True if statename has been loaded, otherwise False.
Calls function in a different state. Please note, parameters can only be strings or integers.
Shows Yes/No dialog box and returns True if the user clicked "yes".
Shows a dialog box showing the requested message
Delays execution for 'time' milliseconds.
Alias for Sys.Sleep
Waits until the end of the current frame and will then remove the requested state from memory.
Kills requested state immediately
Use with care! If any processes are still running the the requested state, a crash (Segmentation Fault or similar errors) can be inevitable!
Wait until the minimum number of ticks were started since the start of this frame
Puts a message on the CLI console but only in debug builds.
Same as CSay, but allowing C string formatting
Typical ATAN2 function, but since it was removed from the math library of Lua, this one will have to do.
Will return true when in debug build and false in release mode
Dumps traceback data on CLI console
Returns the number of ticks since the start of thegame
Returns the current Flow
Start next frame in flow 'flowname'
You can define the flow name to this property.
GotoFlow("MyFlow")
Sys.CurrentFlow = "MyFlow"
// Both lines have same effectContains name of current platform ("Windows","MacOS" or "Linux")
Similar to Sys.Platform, but with more detailed data about the platform. For Linux that will just be "Linux", but for Windows and MacOS more specific data can be returned