Difference between revisions of "Global Commands"
From The Official Visionaire Studio: Adventure Game Engine Wiki
| Line 9: | Line 9: | ||
|- | |- | ||
| [[Global Command: createScreenshot|createScreenshot]] | | [[Global Command: createScreenshot|createScreenshot]] | ||
| − | | | + | | Create a screenshot to be used for the next savegame or to save into an external folder as a .png file. |
|- | |- | ||
| [[Global Command: createSprite|createSprite]] | | [[Global Command: createSprite|createSprite]] | ||
| Line 15: | Line 15: | ||
|- | |- | ||
| [[Global Command: getCursorPos|getCursorPos]] | | [[Global Command: getCursorPos|getCursorPos]] | ||
| − | | | + | | Get the current position of the mouse cursor. |
|- | |- | ||
| [[Global Command: getObject|getObject]] | | [[Global Command: getObject|getObject]] | ||
| − | | | + | | Get a Visionaire object. |
|- | |- | ||
| [[Global Command: getProperty|getProperty]] | | [[Global Command: getProperty|getProperty]] | ||
| − | | | + | | Get the requested game property. |
|- | |- | ||
| [[Global Command: getTime|getTime]] | | [[Global Command: getTime|getTime]] | ||
| − | | | + | | Returns the number of milliseconds since the "getTime()" function was first called or since the timer was reset. |
|- | |- | ||
| [[Global Command: isPointInsidePolygon|isPointInsidePolygon]] | | [[Global Command: isPointInsidePolygon|isPointInsidePolygon]] | ||
| − | | | + | | Test if a point lies inside a polygon. |
|- | |- | ||
| [[Global Command: replaceGame|replaceGame]] | | [[Global Command: replaceGame|replaceGame]] | ||
| − | | | + | | Replaces the Visionaire game file and starts the game from the beginning. |
|- | |- | ||
| [[Global Command: setCursorPos|setCursorPos]] | | [[Global Command: setCursorPos|setCursorPos]] | ||
| − | | | + | | Sets the mouse cursor to the {x,y} position provided. |
|- | |- | ||
| [[Global Command: setDelay|setDelay]] | | [[Global Command: setDelay|setDelay]] | ||
| − | | | + | | Executes a function with a delay. |
|- | |- | ||
| [[Global Command: sha1|sha1]] | | [[Global Command: sha1|sha1]] | ||
| − | | | + | | Calculates the 160-bit (20-byte) SHA-1 (Secure Hash Algorithm 1) hash of a string. |
|- | |- | ||
| [[Global Command: startAction|startAction]] | | [[Global Command: startAction|startAction]] | ||
| − | | | + | | Starts an action. |
|- | |- | ||
| [[Global Command: startAnimation|startAnimation]] | | [[Global Command: startAnimation|startAnimation]] | ||
| − | | | + | | Starts an animation. |
|- | |- | ||
| [[Global Command: startDefaultBrowser|startDefaultBrowser]] | | [[Global Command: startDefaultBrowser|startDefaultBrowser]] | ||
| − | | | + | | Open a URL in the user's default browser or in the steam overlay (if active). |
|- | |- | ||
| [[Global Command: startObjectTween|startObjectTween]] | | [[Global Command: startObjectTween|startObjectTween]] | ||
| − | | | + | | Start tween on a Visionaire object field. |
|- | |- | ||
| [[Global Command: startTween|startTween]] | | [[Global Command: startTween|startTween]] | ||
| − | | | + | | Start tween on a Lua variable. |
|- | |- | ||
| [[Global Command: stopAction|stopAction]] | | [[Global Command: stopAction|stopAction]] | ||
| − | | | + | | Stop an active action. |
|- | |- | ||
| [[Global Command: stopAnimation|stopAnimation]] | | [[Global Command: stopAnimation|stopAnimation]] | ||
| − | | | + | | Stop a running animation. |
|} | |} | ||
Revision as of 00:26, 4 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 | tbd |
| 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 | tbd |
| getSoundProperty | tbd |
| getVolume | tbd |
| setSoundProperty | tbd |
| setVolume | tbd |
| startSound | tbd |
| stopSound | tbd |
| toggleSoundPause | tbd |
Events & Hooks
| Function Name | Description |
|---|---|
| createEvent | tbd |
| registerEventHandler | tbd |
| registerHookFunction | tbd |
| unregisterEventHandler | tbd |
Window
| Function Name | Description |
|---|---|
| getWindowBrightness | tbd |
| getWindowMode | tbd |
| setWindowBrightness | tbd |
| setWindowSize | tbd |
| setWindowTitle | tbd |
| toggleWindowMode | tbd |
Shaders
| Function Name | Description |
|---|---|
| shaderCompile | tbd |
| shaderSetOptions | tbd |
| shaderUniform | tbd |
Game clients (Steam, GOG Galaxy)
| Function Name | Description |
|---|---|
| getGameClientAchievement | tbd |
| getGameClientStat | tbd |
| initGameClient | tbd |
| resetGameClientStats | tbd |
| setGameClientAchievement | tbd |
| setGameClientStat | tbd |
Haptic effects
| Function Name | Description |
|---|---|
| createHapticEffectCondition | tbd |
| createHapticEffectConstant | tbd |
| createHapticEffectLeftRight | tbd |
| createHapticEffectPeriodic | tbd |
| createHapticEffectRamp | tbd |
| startHapticEffect | tbd |
| startHapticRumble | tbd |
| stopHapticEffect | tbd |
| stopHapticRumble | tbd |
Debug
| Function Name | Description |
|---|---|
| debugerror | tbd |
| debugfunc | tbd |