Scripting Documentation - LilbrosGits/Funkin-Sockit-Engine GitHub Wiki

States

Calling Classes

you can call classes like this flixel.FlxG or lime.utils.Assets

with funkin stuff it would be like funkin.objects.Note or funkin.states.PlayState

but only for certain classes you can just refer to the class names

this is the list of classes that u can call the names for commonly:


  • FlxG
  • FlxMath
  • FlxBasic
  • FlxObject
  • FlxSprite
  • FlxTypedGroup HAS ISSUES
  • FlxGroup ISNT TESTED
  • Reflect
  • Path the games core asset finding system
  • Init the games initializer

Calling Functions

these are all functions that are connected to running the game


  • new() initialize variables here normally
  • onCreate() before anything is created (may cause issues with calling certain things!)
  • onCreatePost() after everything is created
  • onUpdate(elapsed:Float) before the game updates
  • onUpdatePost(elapsed:Float) after the game updates
  • onBeat() every beat (if music is playing)
  • onStep() every step (if music is playing)

Modcharting (ONLY IN PLAYSTATE)

these are the extra functions and variables that are only accessed in playstate

Functions

  • onPause() when the game is paused
  • onResume() when the game is resumed
  • onNoteHit(note:Note) when a note is hit
  • onOpponentNoteHit(note:Note) when the opponent hits a note
  • onNoteMiss(note:Note) when a note is missed
  • onSongStart() when the song starts

Variables

  • stage the stage
  • notes the note hud (useful)
  • hud the playstate hud
  • players the players
  • this the state (PlayState) use to get variables that arent documented yet