Repository navigation
Lua Script API: General Functions
Play's a specific character animation.
-
character- The character name, can beboyfriend,dadorgf. -
anim- The animation name to be played. -
forced- Can be eithertrueorfalse, if set totrue, it will force the animation to reset if the current animation is the same as the animation to play.
Make's character do the idle dance.
-
character- The name of the character, can beboyfriend,dadorgf.
Set's the general X position of a character from the type, this will also move all precached characters from the same type into the position you want.
-
type- The character name, can beboyfriend,dadorgf. -
value- The x value of the character position.
Set's the general Y position of a character from the type, this will also move all precached characters from the same type into the position you want.
-
type- The name of the character, can beboyfriend,dadorgf. -
value- The y value of the character position.
Get's the general X position of a character from the type.
-
type- The name of the character name, can beboyfriend,dadorgf.
Get's the general Y position of a character from the type.
-
type- The name of the character name, can beboyfriend,dadorgf.
Add's the value of the current song's score total continuously and recalculate's the rating.
Add's the value of the current song's miss total continuously and recalculate's the rating.
Add's the value of the current song's hit continuously and recalculate's the rating.
Add's the value of the current song's health continuously and recalculate's the rating.
Set's the value of the current song's score total into a specified state and recalculate's the rating.
Set's the value of the current song's miss total into a specified state and recalculate's the rating.
Set's the value of the current song's hit total into a specified state and recalculate's the rating.
Set's the value of the current song's health total into a specified state and recalculate's the rating.
Set's the rating percent in case you want to do your own rating calculation.
-
value- Should go from0to1but can actually be whatever value you want, but it's kinda stupid to get out of the base values.
Set's the rating name to value in case you want to do your own rating calculation.
Set's the rating FC on the scoreTxt.
Get's the current song's score total.
Get's the current song's miss total.
Get's the current song's hit total.
Get's the current song's health total.
Gets the key name that was recently pressed on the current frame.
Keys: left, down, up, right, accept, back, pause, reset, space
-
name- The name of the key listed above.
Get's the key name currently pressed on the current frame.
-
name- The name of the key listed above.
Get's the key name was released on the current frame.
-
name- The name of the key listed above.
Get's the keyboard key name that was recently pressed on the current frame.
-
name- The name of the key on the keyboard.
Example: keyboardJustPressed('SHIFT')
Get's the keyboard key name is being held on the current frame.
-
name- The name of the key on the keyboard.
Get's the keyboard key name was released on the current frame.
-
name- The name of the key on the keyboard.
Get's the mouse button name that was recently pressed on the current frame. Leave the name blank for it to default the name to left.
Buttons: left, right, middle
-
name- The name of the mouse button listed above.
Get's the mouse button name while being held on the current frame.
-
name- The name of the mouse button listed above.
Get's the mouse button name after releasing on the current frame.
-
name- The name of the mouse button listed above.
Retunr's the current x value of the mouse on the specific camera.
-
camera- Can be eithercamGame,camHUDorcamOther.
Retunr's the current y value of the mouse on the specific camera.
-
camera- Can be eithercamGame,camHUDorcamOther.
Check's whether the sprite object exists in the currently playing song.
-
tag- The tag of the sprite object.
Check's whether the text object exists in the currently playing song.
-
tag- The tag of the text object.
Checks whether the sound exists in the currently playing song.
-
tag- The tag of the sound.
Note: Put the file format name to get the file you want.
-
luaFile- The file that you want to detect that is running currently.
Example: isRunning('mods/pathTotheFile/luafile.lua')
Check's multiple script's executing currently.
Note: Put the file format name to get the file you want.
Get's the text from different file's.
-
path- The path of the text file that you are getting. -
ignoreModFolders- An optional parmeter that ignores the mod folder with a boolean.
Example: getTextFromFile('pathTotheFile/ExampleFile.txt')
Get's the folder file in the directory.
-
folder- The path to the folder
Add's a lua script into the game.
-
path- The Lua file path to be chosen.
Remove's a lua script into the game.
-
path- The Lua file path to be chosen.
Add's a library variable into the interpreter.
-
libName- The name of the library name. -
libPackage- The name of the library package.
Example: addHaxeLibrary('FlxTween', 'flixel.tweens')
Note: the codeToRun must be surrounded by double brackets [[]].
It execute's the string as a Haxe script.
Example: runHaxeCode([[haxe code]])
Note: stringSplit() and stringTrim() works in 0.7.0 Version!
Identifie's the string that begins with the start parameter.
-
str- The string to be manipulate. -
start- The start of the string.
Identifie's the string that ends with the end parameter.
-
str- The string to be manipulate. -
end- The end of the string.
Splits a string into multiple string will turn it into a table
-
str- The string to split. -
start- The seperation of the string.
Example: stringSplit('Split, This, LOL!', ', ')[1] This will print 'Split'.
Remove's any unnecessary large spaces from string.
-
str- The string to be converted.
Triggers an event without having to enter it into the chart editor.
-
name- The name of the event in the Chart editor. -
arg1- The value on Value 1. -
arg2- The value on Value 2.
Changes the health color's on the health bar. (Must be a Hexadecimal Color Code)
-
leftHex- The Opponent health bar color. -
rightHex- The Player health bar color.
Changes the time bar color's. (Must be a Hexadecimal Color Code)
-
leftHex- The color thats filling up the time bar. -
rightHex- The background of the time bar.
Get's the color from an Hexadecimal Color Code.
Example: To get orange, you should use getColorFromHex('FF7800') or getColorFromHex('0xFFFF7800').
Return's the current song position. Shortcut to getPropertyClass('Conductor', 'songPosition').
Remove's the a specific note group.
-
obj- The group name of the note. -
index- The note member id. -
dontDestroy- An optional variable. Won't clear member from memory, you will probably never ever use this.
Example: To remove the first spawned note from the group you should use removeFromGroup('notes', 0).
This will randomize a number. (Better than math.random())
-
min- The lowest value. -
max- The highest value.
Works the same as getRandomInt() but only works for float.
-
min- The lowest value. -
max- The highest value.
It randomizes the chance of it being true.
-
chance- The possibility of it beingtrue.
Makes the camera shake.
-
camera- Can be eithercamGame,camHUDorcamOther. -
intensity- How far away should it shake, recommended value is0.05. -
duration- How much time duration for it to shake.
Makes the camera focus on a specific target.
-
target- Target can be eitherboyfriendordad.
Makes the camera flash.
-
camera- Can be eithercamGame,camHUDorcamOther. -
color- The color of the flash. (Must be a Hexadecimal Color Code) -
duration- The amount of time it will shake for. -
forced- Whether or not restart the flashes.
Makes the camera fade.
-
camera- Can be eithercamGame,camHUDorcamOther. -
color- The color of the fade. (Must be a Hexadecimal Color Code) -
duration- The amount of time it will fade for. -
forced- Whether or not restart the flashes.
This command displays a debug message in the top-left corner of the screen. All of the values are optional, and you can print up to 5 of them.
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. And must be used in a Stage script because it won't be used anymore.
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