Difference between revisions of "Global Commands"
From The Official Visionaire Studio: Adventure Game Engine Wiki
| Line 108: | Line 108: | ||
|- | |- | ||
| [[Global Command: registerEventHandler|registerEventHandler]] | | [[Global Command: registerEventHandler|registerEventHandler]] | ||
| − | | | + | | Registering an event handler allows you to run custom functions on specific engine events. |
|- | |- | ||
| [[Global Command: registerHookFunction|registerHookFunction]] | | [[Global Command: registerHookFunction|registerHookFunction]] | ||
| Line 114: | Line 114: | ||
|- | |- | ||
| [[Global Command: unregisterEventHandler|unregisterEventHandler]] | | [[Global Command: unregisterEventHandler|unregisterEventHandler]] | ||
| − | | | + | | Unregister an event handler for a specific engine event which had been registered before. |
|} | |} | ||
| Line 126: | Line 126: | ||
|- | |- | ||
| [[Global Command: getWindowBrightness|getWindowBrightness]] | | [[Global Command: getWindowBrightness|getWindowBrightness]] | ||
| − | | | + | | Returns the brightness (gamma) of the window. |
|- | |- | ||
| [[Global Command: getWindowMode|getWindowMode]] | | [[Global Command: getWindowMode|getWindowMode]] | ||
| − | | | + | | Returns the current window mode, i. e. if the game is running at fullscreen or in a window. |
|- | |- | ||
| [[Global Command: setWindowBrightness|setWindowBrightness]] | | [[Global Command: setWindowBrightness|setWindowBrightness]] | ||
| − | | | + | | Set the global brightness (gamma) of the window. |
|- | |- | ||
| [[Global Command: setWindowSize|setWindowSize]] | | [[Global Command: setWindowSize|setWindowSize]] | ||
| − | | | + | | Set the size of the game window. |
|- | |- | ||
| [[Global Command: setWindowTitle|setWindowTitle]] | | [[Global Command: setWindowTitle|setWindowTitle]] | ||
| − | | | + | | Set a custom title in the game application title bar. |
|- | |- | ||
| [[Global Command: toggleWindowMode|toggleWindowMode]] | | [[Global Command: toggleWindowMode|toggleWindowMode]] | ||
| − | | | + | | Toggle the current window mode form fullscreen to windowed or vice versa. |
|} | |} | ||
Revision as of 23:39, 15 May 2023
This is a list of global commands available in Visionaire Studio.
General
| Function Name | Description |
|---|---|
| createScreenshot | Create a screenshot to be used for the next savegame or to save into an external folder as a .png file. |
| createSprite | |
| getCursorPos | Get the current position of the mouse cursor. |
| getObject | Get a Visionaire object. |
| getProperty | Get the requested game property. |
| getTime | Returns the number of milliseconds since the "getTime()" function was first called or since the timer was reset. |
| isPointInsidePolygon | Test if a point lies inside a polygon. |
| replaceGame | Replaces the Visionaire game file and starts the game from the beginning. |
| setCursorPos | Sets the mouse cursor to the {x,y} position provided. |
| setDelay | Executes a function with a delay. |
| sha1 | Calculates the 160-bit (20-byte) SHA-1 (Secure Hash Algorithm 1) hash of a string. |
| startAction | Starts an action. |
| startAnimation | Starts an animation. |
| startDefaultBrowser | Open a URL in the user's default browser or in the steam overlay (if active). |
| startObjectTween | Start tween on a Visionaire object field. |
| startTween | Start tween on a Lua variable. |
| stopAction | Stop an active action. |
| stopAnimation | Stop a running animation. |
Sound & Volume
| Function Name | Description |
|---|---|
| getSoundId | Retrieve the id of a currently active audio file. |
| getSoundProperty | Retrieve various properties of a sound. |
| getVolume | Retrieve general volume levels. |
| setSoundProperty | Set properties of a sound. |
| setVolume | Set general volume levels. |
| startSound | Play an audio file. |
| stopSound | Stop a playing sound. |
| toggleSoundPause | Toggle an active sound between playing and paused states. |
Events & Hooks
| Function Name | Description |
|---|---|
| createEvent | |
| registerEventHandler | Registering an event handler allows you to run custom functions on specific engine events. |
| registerHookFunction | |
| unregisterEventHandler | Unregister an event handler for a specific engine event which had been registered before. |
Window
| Function Name | Description |
|---|---|
| getWindowBrightness | Returns the brightness (gamma) of the window. |
| getWindowMode | Returns the current window mode, i. e. if the game is running at fullscreen or in a window. |
| setWindowBrightness | Set the global brightness (gamma) of the window. |
| setWindowSize | Set the size of the game window. |
| setWindowTitle | Set a custom title in the game application title bar. |
| toggleWindowMode | Toggle the current window mode form fullscreen to windowed or vice versa. |
Shaders
| Function Name | Description |
|---|---|
| shaderCompile | |
| shaderSetOptions | |
| shaderUniform |
Game clients (Steam, GOG Galaxy)
| Function Name | Description |
|---|---|
| getGameClientAchievement | |
| getGameClientStat | |
| initGameClient | |
| resetGameClientStats | |
| setGameClientAchievement | |
| setGameClientStat |
Haptic effects
Debug
| Function Name | Description |
|---|---|
| debugerror | |
| debugfunc |