-
Notifications
You must be signed in to change notification settings - Fork 7
Lua Script API: Object Functions
Initializes the creation of a colored fill texture.
-
tag
- The sprite object tag name to be used. -
width
- The width value in pixels of the object. -
height
- The height value in pixels of the object. -
color
- The hex color value of the object.
Changes the sprite texture with a new one. With an option to set the crop size of the sprite object.
-
variable
- The sprite object tag name to be used. -
image
- The new image sprite for the sprite object to be used. -
gridX
- An optional parameter, The crop width of the sprite texture. -
gridY
- An optional parameter, The crop height of the sprite texture.
Changes the blend mode of the object. If you want to see more blend modes, click here. (Works similar to how Photoshop does it)
-
obj
- The sprite object tag name to be used. -
blend
- The blend mode to be used; Example:add
,darken
,invert
, etc.
Plays an animation of the sprite object.
-
obj
- The sprite object tag name to be used. -
name
- The name of the animation to be played. -
forced
- Will resets if the animation is played again; Defualt isfalse
. -
reverse
- An optional parameter, Will play the animation from thelast
to thestart
frame. -
startFrame
- An optional parameter, The specified starting frame of the animation.
Adds an animation of the sprite object; it can override an animation. If there are two or similair names inside the name
parameter; this rule is applied to all name
parameters.
-
obj
- The sprite object tag name to be used. -
name
- The name of the animation to be played. -
frames
- The specified array of thexml
animation frames; Example:{1, 2, 3}
. -
framerate
- How many frames per second does the animation has; Defualt is:24
. -
loop
- Whether will the animation will loop when the animation is finished; Defualt istrue
.
Adds the specified animation of the sprite object.
-
obj
- The sprite object tag name to be used. -
name
- The name of the animation to be played. -
prefix
- The prefix name inside thexml
file to be played. -
framerate
- How many frames per second does the animation has; Defualt is:24
. -
loop
- Whether will the animation will loop when the animation is finished; Defualt istrue
.
Adds the specified animation with each indices/frames of the sprite object. If you want the looped version of this function use addAnimationByIndicesLoop()
; all parameters and its use are the same.
-
obj
- The sprite object tag name to be used. -
name
- The name of the animation to be played. -
prefix
- The prefix name inside thexml
file to be played. -
indices
- The specified indices/frames of the animation; Example:1, 2, 3
. -
framerate
- How many frames per second does the animation has; Defualt is:24
.
Adds the offset of the specified animation.
-
obj
- The sprite object tag name to be used. -
anim
- The name of the animation to be used. -
x
- The new x offset value of the animation. -
y
- the new y offset value of the animation.
Sets the current layer position of the object with a new value.
-
obj
- The object tag name to be used. -
position
- The new layer position to be set.
Gets the current layer position of the object current value; Returns a float
number.
-
obj
- The object tag name to be used.
Checks if two objects are overlaping each-other; Returns a boolean
.
-
obj1
- The first object tag name to be used. -
obj2
- The second object tag name to be used.
Sets the object graphic size by pixels; Not to be confused with scaleObject()
.
-
obj
- The object tag name to be used. -
x
- The width value of the object to be set. -
y
- The height value of the object to be set. -
updateHitbox
- Whether it will update the object's dimension or hitbox; Defualt istrue
.
Sets the object size by scale properties.
-
obj
- The object tag name to be used. -
x
- Thescale.x
value of the object to be set. -
y
- Thescale.y
value of the object to be set. -
updateHitbox
- Whether it will update the object's dimension or hitbox; Defualt istrue
.
Updates the object's dimension or hitboxes. Used this if you're changing scale of the object.
-
obj
- The object tag name to be used.
Gets the midpoint x value in graphics, of the object; Not to be confused with getMidpointX()
function; Returns a float
number.
-
variable
- The object tag name to be used.
Gets the midpoint y value in graphics, of the object; Not to be confused with getMidpointY()
function; Returns a float
number.
-
variable
- The object tag name to be used.
Gets the midpoint x value of the object; Returns a float
number.
-
variable
- The object tag name to be used.
Gets the midpoint y value of the object; Returns a float
number.
-
variable
- The object tag name to be used.
Gets the screen x position of the object; Returns a float
number.
-
variable
- The object tag name to be used.
Gets the screen y position of the object; Returns a float
number.
-
variable
- The object tag name to be used.
Sets the object to screen center
with the specified x
or y
position.
-
obj
- The object tag name to be used. -
pos
- The position you want to set in; Can be either:X
,Y
,XY
.
Changes the object that moves along the camera when switching to characters.
-
obj
- The object tag name to be used. -
scrollX
- The x value of the scroll to be set. -
scrollY
- The y value of the scroll to be set.
Changes the object camera state.
-
obj
- The object tag name to be used. -
camera
- The camera state to be set in; Can be either:camGame
,camHUD
orcamOther
.
Removes a specific note type inside the game.
-
obj
- The name of the array/group member, ExampleopponentStrums
,playerStrums
, etc. -
index
- The index number of the array/group member. -
dontDestroy
- An optional parameter, Whether if the note type will be removed permanently making it unable to be re-added; Default isfalse
.
Updates the specific note type hitboxes.
-
obj
- The name of the array/group member, ExampleopponentStrums
,playerStrums
, etc. -
index
- The index number of the array/group member.
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