-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Lua Script API: General Functions
-
character
- Can beboyfriend
,dad
orgf
-
anim
- Animation name to be played -
forced
- Can be eithertrue
orfalse
, if set totrue
, it will force the animation to reset if the current animation is the same as the animation to play
Makes character do the idle dance
-
character
- Can beboyfriend
,dad
orgf
Gets the general X position of a character from the type type
-
type
- Can beboyfriend
,dad
orgf
Sets the general X position of a character from the type type
, this will also move all precached characters from the same type into the position you want
-
type
- Can beboyfriend
,dad
orgf
Gets the general Y position of a character from the type type
-
type
- Can beboyfriend
,dad
orgf
Sets the general Y position of a character from the type type
, this will also move all precached characters from the same type into the position you want
-
type
- Can beboyfriend
,dad
orgf
Adds value
to the current song's score and recalculates rating
Set the current song's score to value
and recalculates rating
Adds value
to the current song's misses total and recalculates rating
Set the current song's misses total to value
and recalculates rating
Adds value
to the current song's notes hit total and recalculates rating
Set the current song's notes hit total to value
and recalculates rating
Sets the rating percent in case you want to do your own rating calculation.
-
value
- Should go from0
to1
but can actually be whatever value you want, but it's kinda stupid to get out of the base values.
Sets the rating name to value
in case you want to do your own rating calculation.
Get if the key name
just got pressed on the current frame.
Keys: 'left'
, 'down'
, 'up'
, 'right'
, 'accept'
, 'back'
, 'pause'
, 'reset'
, 'space'
Get if the key name
is being held on the current frame.
Keys: 'left'
, 'down'
, 'up'
, 'right'
, 'space'
Get if the key name
was released on the current frame.
Keys: 'left'
, 'down'
, 'up'
, 'right'
, 'space'
Get if the mouse button name
just got pressed on the current frame. leave 'name' blank for left mouse
Buttons: 'left'
, 'right'
, 'middle'
Get if the mouse button name
is being held on the current frame.
Buttons: 'left'
, 'right'
, 'middle'
Get if the mouse button name
was released on the current frame.
Buttons: 'left'
, 'right'
, 'middle'
Returns the relative mouse X position on a specific camera
-
camera
- Can be eithergame
,hud
orother
Returns the relative mouse Y position on a specific camera
-
camera
- Can be eithergame
,hud
orother
Triggers an event without you having to chart them.
-
name
- Event name on Chart Editor -
arg1
- Value 1 on Chart Editor -
arg2
- Value 2 on Chart Editor
Loads another .lua script.
-
path
- Path to LUA relative to the base folder
Get the color decimal ID from an Hexadecimal value (color
).
Example: To get orange, you should use getColorFromHex('FF7800')
or getColorFromHex('0xFFFF7800')
Returns the current song position. Shortcut to getPropertyClass('Conductor', 'songPosition')
-
camera
- "game", "hud" or "other" -
intensity
- How far away should it shake, recommended value is0.05
-
duration
- Time duration for it to shake
Makes the camera focus on a specific target
-
target
- Target can be eitherboyfriend
ordad
-
camera
- "game", "hud" or "other" -
color
- color of flash -
duration
- Time duration for it to flash -
forced
- restarts flash or not
-
camera
- "game", "hud" or "other" -
color
- color of fade -
duration
- Time duration for it to fade -
forced
- restarts fade or not
-
Prints a debug message on the top-left corner of the screen
-
All values are optional
-
You can have up to 5 values to be printed.
Example: debugPrint("Current boyfriend character: ", getProperty("boyfriend.curCharacter"));
This will print the following message: Current boyfriend character: bf
Stops your script in the next 100 miliseconds.
-
printMessage
- Wether you want a warning to show on the top-left corner of the screen or not