-
Notifications
You must be signed in to change notification settings - Fork 7
Lua Script API: Object Functions
Meme1079 edited this page Aug 5, 2022
·
27 revisions
Spawns a graphic with no image
-
tag
- the sprite object's tag -
width
- the width of the sprite object -
height
- the height of the sprite object -
color
- the color of the sprite object, must be a hex color!
Example: Use makeGraphic('testBlackSquare', 1000, 1000, '000000') to make the Lua Sprite with the tag "testBlackSquare" turn into a 1000x1000 black square.
Changes the blend mode of a Sprite (Works similar to how Photoshop do it)
-
obj
- the sprite object's tag -
blend
- Blend mode to use. Example: add, darken, normal. List of blend modes
Changes the size of the graphic
-
obj
- the sprite object's tag -
x
- the x-coordinate of the sprite object -
y
- the x-coordinate of the sprite object -
updateHitbox
- iftrue
will change the sprite's scale manually or via a tween.
Is the page in some way inaccurate? an error, a typo, or outdated data? To report it, use the "Issue Tab". Or do you wish to include a new function or add new information? use the "Pull Request Tab". Help is always appreciated!
- Event Callbacks
- Custom Sprite
- Custom Text
- Object Functions
- General Functions
- Scripting & File Functions
- Game Input Control Functions
- Language Translation
- HScript Functions
- Custom Substates
- Custom Shaders
- Deprecated & Removed Functions
- Sound & Music Functions
- Tweens & Timers Functions
- Reflection Functions
- Variables