HScript Variables - SlightlySimple/FNF-Restructure-Engine GitHub Wiki

These are the variables that are accessible through the game variable in scripts. Some are also usable by the setGameVariable event in the Chart Editor.

  • songName is the name of the song as it is displayed in-game and on the results screen.
  • missSounds is an array of sounds, one of which will be played whenever the player misses.
  • camFollow is the target of the game camera, while camFollowPos is the actual location of the game camera.
  • camFollowRate is the speed at which the camera will move to camFollow, and by default, is 0.04. If it is set to 0, the camera will always be at the exact location of camFollow.
  • camFocus is the character the camera is focused on. If updateCamFocus is set to false, this can be changed manually.
  • overrideCamFocus controls whether or not the camera actually locks to camFocus. If this is set to true, the camera can be positioned directly.
  • camZoom is the zoom that the camera will reset to whenever it bumps. Note that this doesn't directly affect the zoom of the camera, and for that you would need to change FlxG.camera.zoom which does not fall under the game variables.
  • camBumpRate is how many beats the camera will wait before bumping. By default, it is 4. If it is set to 0, the camera will not bump at all.
  • camBumpSequence is an array of true/false values which can be changed to make the camera bump in a repeated sequence rather than just when a certain amount of beats have passed.
  • playerColumns is an array of numbers that dictates which columns the player controls, and is usually determined by what side of the chart is being played. On a normal 4 key chart, this will by default either be [4,5,6,7] normally and [0,1,2,3] on the opponent's side.
  • scoreTxt is the text that displays the player's score and other information, depending on what they have enabled.
  • judgementCounter is the text that shows the player's judgements and misses, if enabled.
  • ratingPopups is a sprite group that contains all of the popups that show the player's rating and combo when they hit a note.
  • allCharacters is an array of every character spawned in by the game. While the first three get their own variables (those being player1, player2, and gf) this can be used for any characters beyond those three.
  • allReactors is an array of characters that will play their "sad" animation when the player breaks their combo. By default, only gf is in this list, if they exist.
  • keysArray is an array of controls that are used by the player. This can be set either to specific keys or to keybinds from the Options menu. When setting to keys directly, it must be treated as an array of arrays. For example, keysArray = [FlxKey.LEFT], [FlxKey.DOWN], [FlxKey.UP], [FlxKey.RIGHT](/SlightlySimple/FNF-Restructure-Engine/wiki/FlxKey.LEFT],-[FlxKey.DOWN],-[FlxKey.UP],-[FlxKey.RIGHT);. By default, it is set to [Options.options.keys.note_left, Options.options.keys.note_down, Options.options.keys.note_up, Options.options.keys.note_right].
  • suspendControls is whether or not the game's controls are disabled. When set to true, it will disable the game's controls and automatically retract any controls that are being held down.
  • health is the amount of health the player has, with 0 being the lowest and 100 being the highest.
  • healthBar is the on-screen bar that displays the health. It is a single object, with it's black outline being a part of it.
  • healthIconP1 and healthIconP2 are the icons of the characters on the health bar.
  • iconBumpRate is the rate, in beats, at which the health icons bump. By default, this is 1.
  • songProgressBar is the on-screen bar that displays how far into the song the player is. songProgressText is the text that's overlayed on top of it.
  • countdownMultiplier controls how many beats each tick of the countdown will last. By default, it is 1.
  • doNextSongTrans controls whether or not the black fade transition will happen at the end of the song. By default, it is false.