vars
api 復(fù)制 Unique Lua Variables Note: These are the only variables can be change by using = true or = false for now; Example: luaDebugMode = true. For now you will have to use setProperty() function if you want to change the rest of the variables. Function_Continue - Continues the game; Returns: 0. Function_StopLua - Stops the game; Returns: 1. Function_Stop - Stops the Lua script; Returns: 2. luaDebugMode - Enables debug mode; Default value: false. luaDeprecatedWarnings - Checks if the function or variable is deprecated or not; Only works in debug mode tho. inChartEditor - Checks if the Lua script is running inside the Chart Editor's chart playtest. Song & Week Variables curBpm Checks the current BPM value of the song. bpm - Returns the starting BPM value of the song. scrollSpeed - Checks the scroll speed of the song. crochet - Checks the interval between curBeat variable. stepCrochet - Checks the interval between curStep variable. songLength - Returns the maximum song length displayed in milliseconds. songName - Returns the current song name. songPath - Returns the song's path. startedCountdown - Checks if the countdown has already begun. curStage - Checks the current stage of the song. isStoryMode - Checks if the song is in story mode or not. difficulty - Returns the current difficulty ID number. difficultyName - Returns the current difficulty name. difficultyPath - Returns the current difficulties path. weekRaw - Returns the raw current week number. week - Returns the current week name from the JSON file name. seenCutscene - Checks if the cutscene is seen. hasVocals - Checks if the song has vocals enable or not. All Shortcut to: curBpm - getPropertyFromClass('backend.Conductor', 'bpm') bpm - getPropertyFromClass('states.PlayState', 'SONG.bpm') scrollSpeed - getPropertyFromClass('states.PlayState', 'SONG.speed') crochet - getPropertyFromClass('backend.Conductor', 'crochet') stepCrochet - getPropertyFromClass('backend.Conductor', 'stepCrochet') songLength - getPropertyFromClass('flixel.FlxG', 'sound.music.length') songName - getPropertyFromClass('states.PlayState', 'SONG.song') songPath - getPropertyFromClass('backend.Paths', 'formatToSongPath('..songName..')') startedCountdown - getProperty('startedCountdown') curStage - getPropertyFromClass('states.Playstate', 'curStage') isStroyMode - getPropertyFromClass('states.Playstate', 'isStoryMode') difficulty - getPropertyFromClass('states.Playstate', 'storyDifficulty') difficultyName - getPropertyFromClass('backend.Difficulty', 'getString()') difficultyPath - getPropertyFromClass('backend.Paths', 'formatToSongPath('..difficultyName..')') weekRaw - getPropertyFromClass('states.Playstate', 'storyWeek') week - getPropertyFromClass('backend.WeekData', 'weeksList['..weekRaw..']') seenCutscene - getPropertyFromClass('states.PlayState', 'bpm') hasVocals - getPropertyFromClass('states.PlayState', 'SONG.needsVoices') Deprecated Original Shorcuts: PlayState Variables curStep - The current step per number. curBeat - The current beat per number. curSection - The current section per number. curDecStep - The current decimal step per number. curDecBeat - The current decimal beat per number. score - The current amount of score inside the song. misses - The current amount of note misses inside the song. hits - The current amount of note hits inside the song. combo - The current amount of note combo inside the song. rating - The current song score rating percent; Goes from 0 to 1. ratingName - The current song score rating name. ratingFC - The current song score rating combo. version - The current version of Psych Engine. inGameOver - Checks if the player is in game-over screen or not. mustHitSection - Checks if the section is in Must Hit Section from the Chart Editor. altAnim - Checks if the section is in Alt Animation Section from the Chart Editor. gfSection - Checks if the section is in GF Section from the Chart Editor. buildTarget - Checks the current build target of Psych Engine; Returns: windows, linux, mac, browser, android, unknown. All Shortcut to: curStep - getProperty('curStep') curBeat - getProperty('curBeat') curSection - getProperty('curSection') curDecStep - getProperty('curDecStep') curDecBeat - getProperty('curDecBeat') score - getProperty('songScore') misses - getProperty('songMisses') hits - getProperty('songHits') combo - getProperty('combo') rating - getProperty('ratingPercent') ratingName - getProperty('ratingName') ratingFC - getProperty('ratingFC') version - getPropertyFromClass('states.MainMenuState', 'psychEngineVersion') Deprecated Original Shorcuts: Gameplay Settings Variables healthGainMult - The amount of health gain when hitting a note. healthLossMult - The amount of health loss when missing/missinputing a note. playbackRate - The amount of play-back rate of the song. instakillOnMiss - Enables instant death when missing/missinputing a note. botPlay - Checks if botplay mode is enable or not. practice - Checks if practice mode is enable or not. All Shortcut to: healthGainMult - getProperty('healthGain') healthLossMult - getProperty('healthLoss') playbackRate - getProperty('playbackRate') instakillOnMiss - getProperty('instakillOnMiss') botPlay - getProperty('cpuControlled') practice - getProperty('practiceMode') Client Preferences Variables downscroll - Checks if downscroll is enable or not. middlescroll - Checks if middlescroll is enable or not. framerate - Checks the current framerate inside the ghostTapping - Checks if ghost tapping is enable or not. hideHud - Checks if the score bar/health bar elements are hidden or not. timeBarType - Checks the current time-bar display type. scoreZoom - Checks if the score is being zoom when hitting a note. cameraZoomOnBeat - Checks if the camera does a zoom on beat hit. flashingLights - Checks if flishing lights is enable or not. (Disable this, if you have epilepsy!) noteOffset - Checks the note offset displayed in milliseconds; Goes from 0 to 500. healthBarAlpha - Checks the current amount of alpha/opacity value of the health bar. noResetButton - Checks if the reset button is enable or not. lowQuality - Checks if low quality on songs, is enable or not. (Disable it, if you have a potato computer) shadersEnabled - Checks if shaders is enable or not. (Disable it, if you have motion sickness!) scriptName - Checks the current script name. currentModDirectory - Checks the current mod directory. noteSkin - The current noteskin that you're using. splashSkin - The current splashskin that you're using. splashAlpha - The current alpha/opacity value of the splashnote. All Shortcut to: Screen & Camera Variables screenWidth - Returns the current width of the window screen; Default value: 720. screenHeight - Returns the current width of the window screen; Default value: 720. cameraX - Returns the current x position of camera. cameraY - Returns the current y position of camera. All Shortcut to: screenWidth - getPropertyFromClass('flixel.FlxG', 'width') screenHeight - getPropertyFromClass('flixel.FlxG', 'height') cameraX - getProperty('camGame.scroll.x') - (screenWidth / 2) cameraY - getProperty('camGame.scroll.y') - (screenHeight / 2) Deprecated Original Shorcuts: Character Veriables boyfriendName - Checks the current boyfriend character name. dadName - Checks the current opponent character name. gfName - Checks the current girlfriend character name. All Shortcut to: boyfriendName - getPropertyFromClass('states.PlayState', 'SONG.player1') dadName - getPropertyFromClass('states.PlayState', 'SONG.player2') gfName - getPropertyFromClass('states.PlayState', 'SONG.gfVersion') Deprecated Original Shorcuts: Strum Receptor/Character Variables Player Strum Positions defaultPlayerStrumX0 - The player's left arrow default x position value; Returns: 1068. defaultPlayerStrumX1 - The player's down arrow default x position value; Returns: 956. defaultPlayerStrumX2 - The player's up arrow default x position value; Returns: 844. defaultPlayerStrumX3 - The player's right arrow default x position value; Returns: 732. defaultPlayerStrumY0 - The player's left arrow default y position value; Returns: 50. defaultPlayerStrumY1 - The player's down arrow default y position value; Returns: 50. defaultPlayerStrumY2 - The player's up arrow default y position value; Returns: 50. defaultPlayerStrumY3 - The player's right arrow default y position value; Returns: 50. All Shortcut to: defaultPlayerStrumX0 - getPropertyFromGroup('playerStrums.members', 0, 'x') defaultPlayerStrumX1 - getPropertyFromGroup('playerStrums.members', 1, 'x') defaultPlayerStrumX2 - getPropertyFromGroup('playerStrums.members', 2, 'x') defaultPlayerStrumX3 - getPropertyFromGroup('playerStrums.members', 3, 'x') defaultPlayerStrumY0 - getPropertyFromGroup('playerStrums.members', 0, 'y') defaultPlayerStrumY1 - getPropertyFromGroup('playerStrums.members', 1, 'y') defaultPlayerStrumY2 - getPropertyFromGroup('playerStrums.members', 2, 'y') defaultPlayerStrumY3 - getPropertyFromGroup('playerStrums.members', 3, 'y') Opponent Strum Positions defaultOpponentStrumX0 - The opponent's left arrow default x position value; Returns: 428. defaultOpponentStrumX1 - The opponent's down arrow default x position value; Returns: 316. defaultOpponentStrumX2 - The opponent's up arrow default x position value; Returns: 204. defaultOpponentStrumX3 - The opponent's right arrow default x position value; Returns: 92. defaultOpponentStrumY0 - The opponent's left arrow default y position value; Returns: 50. defaultOpponentStrumY1 - The opponent's down arrow default y position value; Returns: 50. defaultOpponentStrumY2 - The opponent's up arrow default y position value; Returns: 50. defaultOpponentStrumY3 - The opponent's right arrow default y position value; Returns: 50. All Shortcut to: defaultOpponentStrumX0 - getPropertyFromGroup('opponentStrums.members', 0, 'x') defaultOpponentStrumX1 - getPropertyFromGroup('opponentStrums.members', 1, 'x') defaultOpponentStrumX2 - getPropertyFromGroup('opponentStrums.members', 2, 'x') defau