Script
Inherits ScriptBase.
For a version of this page but split by categories, see Scripting API.
Variables
Name |
Type |
Description |
---|---|---|
entityID |
The Entity’s own identifier. |
|
graphicsModule |
Memory address to the Graphics Module. |
|
physicsModule |
Memory address to the Physics Module. |
|
windowModule |
Memory address to the Window Module. |
|
audioModule |
Memory address to the Audio Module. |
|
ecs |
Memory address to the Entity-Component-System. |
|
assetManager |
Memory address to the Asset Manager. |
|
frameLimiter |
Memory address to the Frame Limiter. |
|
jobSystem |
Memory address to the Job System. |
|
networking |
Memory address to the Networking. |
|
sceneManager |
Memory address to the manager of Scenes. |
Functions
Name |
Description |
---|---|
Initialization function executed once, when the Script is created. |
|
Update function executed once per frame. |
|
Destruction function executed once, when the Script is destroyed. |
|
Creates an empty model and returns its pointer. |
|
Loads a model from a file in the Asset Manager and returns a pointer to the loaded model. |
|
Loads a mesh in the Graphics Module and returns a unique identifier to this mesh. |
|
Destroys a model. |
|
Returns the model associated with the name. |
|
Returns the name of the model. |
|
Creates an empty material and returns its pointer. |
|
Loads a material from a file in the Asset Manager and returns a pointer to the loaded material. |
|
Destroys a material. |
|
Returns the material associated with the name. |
|
Returns the name of the material. |
|
Creates an empty image and returns its pointer. |
|
Loads an image from a file in the Asset Manager and returns a pointer to the loaded image. |
|
Loads an image in the Graphics Module and returns a unique identifier to this image. |
|
Destroys an image. |
|
Returns the image associated with the name. |
|
Returns the name of the image. |
|
Creates an empty font and returns its pointer. |
|
Loads a font from a file in the Asset Manager and returns a pointer to the loaded font. |
|
Loads a font in the Graphics Module and returns a unique identifier to this font. |
|
Destroys a font. |
|
Returns the font associated with the name. |
|
Returns the name of the font. |
|
Creates an empty sound and returns its pointer. |
|
Loads a sound from a file in the Asset Manager and returns a pointer to the loaded sound. |
|
Loads a sound in the Audio Module and returns a unique identifier to this sound. |
|
Destroys a sound. |
|
Returns the sound associated with the name. |
|
Returns the name of the sound. |
|
Loads a scene from a file. |
|
Returns the current scene’s path. |
|
Creates a new Entity. |
|
Destroys an Entity. |
|
Destroys all Entities. |
|
Destroys all Entities not marked as persistent. |
|
Checks if an Entity exists. |
|
Sets a name to an Entity. |
|
Checks if an Entity has a name. |
|
Returns the name of the Entity. |
|
Returns the Entity associated with the name. |
|
Marks or unmarks the Entity as persistent. |
|
Checks if an Entity is persistent. |
|
Adds an Entity to an Entity Group. |
|
Removes an Entity from an Entity Group. |
|
Checks if an Entity Group exists. |
|
Checks if an Entity is in an Entity Group. |
|
Returns the Entities in an Entity Group. |
|
Returns the Entity Groups of an Entity. |
|
Returns the state of a keyboard key. |
|
Returns the state of a mouse button. |
|
Sets the mouse cursor position. |
|
Returns the mouse cursor horizontal position. |
|
Returns the mouse cursor vertical position. |
|
Returns the horizontal mouse scroll offset between the last and current frame. |
|
Returns the vertical mouse scroll offset between the last and current frame. |
|
Sets the mouse cursor’s visibility. |
|
Checks if the cursor is visible. |
|
Returns the list of connected gamepads. |
|
Returns the state of a gamepad button. |
|
Returns the value of the stick’s horizontal axis, with -1.0 being left, 0.0 neutral and 1.0 right. |
|
Returns the value of the stick’s vertical axis, with -1.0 being up, 0.0 neutral and 1.0 down. |
|
Returns the value of the stick’s left trigger, with 0.0 being neutral and 1.0 being fully pressed. |
|
Returns the value of the stick’s right trigger, with 0.0 being neutral and 1.0 being fully pressed. |
|
Returns the name of the gamepad. |
|
Opens a new window. |
|
Checks if the window is opened. |
|
Closes the window. Closing the main window closes the application. |
|
Returns the unique identifier of the main window. |
|
Returns the number of opened windows. |
|
Sets the size of the window. |
|
Returns the width of the window. |
|
Returns the height of the window. |
|
Sets the position of the window on the screen. |
|
Returns the horizontal position of the window on the screen. |
|
Returns the vertical position of the window on the screen. |
|
Puts the window in fullscreen or windowed. |
|
Checks if the window is in fullscreen. |
|
Removes or adds the window decorations. |
|
Checks if the window decorations are shown. |
|
Enables or disables manual window resizing. |
|
Checks if the window can be manually resized. |
|
Sets the window’s opacity. |
|
Returns the window’s opacity. |
|
Returns the path to the files dropped on the window. |
|
Sets the window’s title. |
|
Returns the window’s title. |
|
Sets the window’s icon. |
|
Returns the width of the main monitor. |
|
Returns the height of the main monitor. |
|
Returns the refresh rate of the main monitor. |
|
Returns the display scaling of the main monitor. |
|
Sets the color of the background. |
|
Emits particles described by a ParticleEmitter. |
|
Destroys all particles. |
|
Returns information about the intersection of two ColliderShapes. |
|
Casts a ray and returns information about the intersection between the ray and the ColliderShape. |
|
Casts a ray and returns information about the hit Entities. |
|
Sets the constant forces. |
|
Returns the constant forces. |
|
Plays a global sound and returns a unique identifier to this sound source. |
|
Plays a sound at a certain position and returns a unique identifier to this sound source. |
|
Resumes a paused sound source. |
|
Pauses a playing sound source. |
|
Stops a playing or paused sound. |
|
Returns the state of a sound source. |
|
Checks if any sound source of a certain sound is playing. |
|
Sets the position of a sound source. |
|
Returns the position of a sound source. |
|
Sets the gain of a sound source. |
|
Returns the gain of a sound source. |
|
Sets the pitch of a sound source. |
|
Returns the pitch of a sound source. |
|
Sets the current playing time of an Animation played by an Entity. |
|
Checks if an Entity is currently playing a certain Animation. |
|
Draws text on the User Interface. |
|
Draws a line on the User Interface. |
|
Draws a rectangle on the User Interface. |
|
Draws an image on the User Interface. |
|
Sets the maximum number of frames per second. |
|
Returns the maximum number of frames per second. |
|
Launches a job to be executed by a worker thread. |
|
Launches a job to be executed by multiple worker threads. |
|
Waits for all worker threads to finish their jobs. |
|
Returns the number of threads. |
|
Creates a ServerSocket. |
|
Creates a ClientSocket. |
|
Closes a ServerSocket. |
|
Closes a ClientSocket. |
|
Creates a new Script for a Scriptable Component. |
|
Starts a profiling session. |
|
Returns the result of the profiling. |
|
Ends a profiling session and returns the result. |
|
Checks if the profiler is running. |
|
Starts a profiling block. |
|
Ends a profiling block. |