Repository navigation
Lua Script API: Variables
Meme1079 edited this page Oct 1, 2022
·
48 revisions
Note:
Those are the only variables that can be changed by using = true or = false for now, you will have to use setProperty if you want to change the rest of them.
-
Function_Stop- Stops the game. (Must have return) -
Function_StopLua- Stops the any lua files. (Must have return) -
Function_Continue- Continue the game. (Must have return) -
luaDebugMode- Enables debug mode, useluaDebugMode = trueto enable it, Default value:false -
luaDeprecatedWarnings- Only works in Debug mode; useluaDeprecatedWarnings = falseto turn it off; default value is 'true'. Informs you if a function or variable is deprecated and shouldn't be used anymore. -
inChartEditor- Tells you if your script is running on Chart Editor's chart playtest.
-
curBpm- Current BPM of the Song, shortcut togetPropertyFromClass('Conductor', 'bpm'). -
bpm- Starting BPM of the Song, shortcut togetProperty('SONG.bpm'). -
scrollSpeed- Starting Scroll speed of the Song, shortcut togetProperty('SONG.speed'). -
crochet- Interval between Beat hits. -
stepCrochet- Interval between Step hits. -
songLength- Song duration in milliseconds. -
songName- Self-explanatory, Shortcut togetProperty('SONG.song'). -
isStoryMode- Self-explanatory, Shortcut togetProperty('isStoryMode'). -
difficulty- Returns the difficulty ID [Easy = 0, Normal = 1, Hard = 2], Shortcut togetProperty('storyDifficulty'). -
difficultyName- Returns the difficulty name. -
weekRaw- Returns the raw current week number. I doubt you will ever use this, but hey, just in case you do, it's here. -
week- Returns the properly formatted current week file name.
-
cameraX- The current x position of camera, Shortcut togetProperty('camFollowPos.s'). -
cameraY- The current y position of camera, Shortcut togetProperty('camFollowPos.y'). -
screenWidth- The current width of the window, Shortcut togetPropertyFromClass('FlxG', width). -
screenHeight- The current height of the window, Shortcut togetPropertyFromClass('FlxG', heigth).
-
startedCountdown- Indicates whether the countdown has already begun, Shortcut togetProperty('startedCountdown'). -
skipCountdown- The countdown is skipped, Shortcut togetProperty('skipCountdown'). -
seenCutscene- Checks if the cutscene is seen, Shortcut togetPropertyFromClass('PlayState', 'seenCutscene')). -
curStep- The current step number, Shortcut togetProperty('curStep'). -
curDecStep- The current decimal step number, Shortcut togetProperty('curDecStep'). -
curBeat- The current beat number, Shortcut togetProperty('curBeat'). -
curDecBeat- The current decimal beat number, Shortcut togetProperty('curDecBeat'). -
curSection- The current number, Shortcut togetProperty('curSection'). -
score- The current song score, Shortcut togetProperty('songScore'). -
hits- The current note hits, Shrotcut togetProperty('songHits'). -
misses- The current song misses, Shortcut togetProperty('songMisses'). -
ghostMisses- The current song ghost misses, Shortcut togetProperty('ghostMisses'). -
rating- The current rating percentage this goes from0to1, Shortcut togetProperty('ratingPercent'). -
ratingName- The current ratings name, Shortcut togetProperty('ratingString'). -
ratingFC- The current ratings combo, Shortcut togetProperty('ratingFC'). -
inGameOver- Tells if the player is in the game over screen. -
mustHitSection- Tells if the current section is aMust Hit Sectionfrom the Chart Editor. -
altAnim- Tells if the current section is aAlt Animation Sectionfrom the Chart Editor. -
gfSection- Tells if the current section is aGF Sectionfrom theChart Editor. -
healthGainMult- The current health gain of hitting a note, Shortcut togetProperty('healthGainMult'). -
healthLossMult- The current health loss of missing a note, Shortcut togetProperty('healthLossMult'). -
instakillOnMiss- If you missed a note you die, Shortcut togetProperty('instakillOnMiss'). -
botPlay- Tells if botplay is enabled, Shortcut togetProperty('cpuControlled'). -
practice- Tells if practice is enabled, Shortcut togetProperty('practiceMode'). -
version- The version of Psych Engine that is currently in, Shortcut togetPropertyFromClass('MainMenuState', 'psychEngineVersion'). -
debugKeysChart- The Chart Editor key, Shortcut togetProperty('debugKeysChart'). -
debugKeysCharacter- The Character Editor key, Shortcut togetProperty('debugKeysCharacter').
-
boyfriendName- The name of the boyfriend character, Shortcut togetProperty('SONG.player1'). -
dadName- The name of the dad character, Shortcut togetProperty('SONG.player2'). -
gfName- The name of the girlfriend character, Shortcut togetProperty('SONG.gfVersion').
-
defaultPlayerStrumX0- Player's default left arrow X. -
defaultPlayerStrumY0- Player's default left arrow Y. -
defaultPlayerStrumX1- Player's default down arrow X. -
defaultPlayerStrumY1- Player's default down arrow Y. -
defaultPlayerStrumX2- Player's default up arrow X. -
defaultPlayerStrumY2- Player's default up arrow Y. -
defaultPlayerStrumX3- Player's default right arrow X. -
defaultPlayerStrumY3- Player's default right arrow Y. -
defaultOpponentStrumX0- Opponent's default left arrow X. -
defaultOpponentStrumY0- Opponent's default left arrow Y. -
defaultOpponentStrumX1- Opponent's default down arrow X. -
defaultOpponentStrumY1- Opponent's default down arrow Y. -
defaultOpponentStrumX2- Opponent's default up arrow X. -
defaultOpponentStrumY2- Opponent's default up arrow Y. -
defaultOpponentStrumX3- Opponent's default right arrow X. -
defaultOpponentStrumY3- Opponent's default right arrow Y.
-
defaultBoyfriendX- Player's Default X position, defined by the Stagesjsonfile. -
defaultBoyfriendY- Player's Default Y position, defined by the Stagesjsonfile. -
defaultOpponentX- Opponent's Default X position, defined by the Stagesjsonfile. -
defaultOpponentY- Opponent's Default Y position, defined by the Stagesjsonfile. -
defaultGirlfriendX- Girlfriend's Default X position, defined by the Stagesjsonfile. -
defaultGirlfriendY- Girlfriend's Default Y position, defined by the Stagesjsonfile.
Note: All the shortcuts on Preferences Variables are getPropertyFromClass('ClientPrefs', 'Preferences Variable').
Except: scriptName, noResetButton, buildTarget
Example: getPropertyFromClass('ClientPrefs', 'downscroll')
-
downscroll- Checks if the player notes are in downscroll. -
middlescroll- Checks if the player notes are in centerfield. -
opponentStrums- Checks the opponents strums visibility. -
framerate- Checks the current framerate on the game. -
ghostTapping- Checks if ghost tapping is enabled. -
hideHud- Checks if the accuracy bar, icons, and health bar is hidden. -
hideTime- Checks if the time bar is hidden. -
timeBarType- Checks the time bar displayed. -
cameraZoomOnBeat- Checks the camera zoom on beat. -
flashingLights- Checks if the song has flashing lights . (Recommended to disable it, if you have one!) -
lowQuality- Checks if the song is low quality. (Recommended to enable it, if you have a potato computer) -
noteOffset- Checks the note offset in milliseconds, Goes from0to500. -
noResetButton- Checks if the reset button is activated, Shortcut togetPropertyFromClass('ClientPrefs', 'noReset'). -
healthBarAlpha- Checks the alpha/opacity of the health bar. -
scoreZoom- Checks if the score is being zoom when hitting a note. -
shadersEnabled- Checks if the shaders is enabled. -
scriptName- Checks the script name that is running in game. -
buildTarget- Checks the build target of Psych Engine.
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