This repository was archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Script API 1: All Preset Variables
lunarcleint edited this page Nov 9, 2022
·
10 revisions
-
function new()Called when script is created. -
function destroy()Called when script is destroyed. -
function update(elapsed:Float)A function that is called every frame. -
function trace(_)This function will trace any objects you put in it,trace("hi", "t") //prints hi,t -
function import(path:String, ?as:Null<String>)Will import as the haxe function would work, this only imports classes. It is important to treat the haxe classes you import carefully since they maybe be turned into another type depending on the platform. -
function addScript(scriptName:String):DynamicThis will add any script inscripts/, this functions also returnsgetScript(scriptName) -
function getScript(scriptName:String):DynamicThis will give the script's local functions and variables as a Dynamic object. -
ScriptReturna shortcut to the enum ScriptReturn
-
StdA shortcut to the Std Class. -
TypeA shortcut to the Type Class. -
ReflectA shortcut to the Reflect Class. -
MathA shortcut to the Math Class. -
StringToolsA shortcut to the StringTools Class. -
FileSystemA shortcut to the FileSystem Class. [THIS IS ONLY ACCESSIBLE ON THE SYS PACKAGE] -
FileA shortcut to the File Class. [THIS IS ONLY ACCESSIBLE ON THE SYS PACKAGE] -
SysA shortcut to the Sys Class. [THIS IS ONLY ACCESSIBLE ON THE SYS PACKAGE]
-
LibA shortcut to the Lib Class. -
CapabilitiesA shortcut to the Capabilities Class. -
ShaderFitlerA shortcut to the ShaderFitler Class. -
FlxGA shortcut to the FlxG Class. -
FlxBasicA shortcut to the FlxBasic Class. -
FlxObjectA shortcut to the FlxObject Class. -
FlxSpriteA shortcut to the FlxSprite Class. -
FlxGraphicA shortcut to the FlxGraphic Class. -
FlxTweenA shortcut to the FlxTween Class. -
FlxEaseA shortcut to the FlxEase Class. -
FlxTimerA shortcut to the Class. -
FlxTextA shortcut to the FlxText Class. -
FlxTextFormatA shortcut to the FlxTextFormat Class. -
FlxTextFormatMarkerPairA shortcut to the FlxTextFormatMarkerPair Class. -
FlxTextBorderStyleA shortcut to the FlxTextBorderStyle Class. -
FlxShaderA shortcut to the Class. -
FlxRuntimeShaderA shortcut to the FlxRuntimeShader Class. -
FlxSoundA shortcut to the FlxSound Class.
-
var state:FlxStateA shortcut to FlxG.state. -
var camera:FlxCameraA shortcut to the FlxG.camera.
-
function add(obj:FlxBasic)A shortcut to FlxG.state.add(obj). -
function insert(postion:Int, obj:FlxBasic)A shortcut to FlxG.state.insert(postion, obj). -
function remove(obj:FlxBasic)A shortcut to FlxG.state.remove(obj). -
function colorFromRGB(Red:Int, Green:Int, Blue:Int, Alpha:Int = 255)A shortcut to FlxColor.fromRGB(Red, Green, Blue, Alpha). -
function colorFromString(str:String)A shortcut to FlxColor.fromString(str).
-
ClientPrefsA shortcut to the ClientPrefs Class. -
WeekDataA shortcut to the WeekData Class. -
HighscoreA shortcut to the Highscore Class. -
StageDataA shortcut to the StageData Class. -
PathsA shortcut to the Paths Class. -
SongA shortcut to the Song Class. -
SectionA shortcut to the Section Class. -
ConductorA shortcut to the Conductor Class. -
NoteA shortcut to the Note Class. -
StrumNoteA shortcut to the StrumNote Class. -
NoteSplashA shortcut to the NoteSplash Class. -
CharacterA shortcut to the Character Class. -
BoyfriendA shortcut to the Boyfriend Class.
-
PlayStateA shortcut to the PlayState Class. Please note that this is not the current instance of Playstate, for that usePlayState.instance.
-
var curStep:IntA shortcut to PlayStates's curStep. -
var curBeat:IntA shortcut to PlayStates's curBeat. -
var bpm:FloatA shortcut to PlayStates's bpm. -
var camGame:FlxCameraA shortcut to PlayStates's camGame. -
var camHUD:FlxCameraA shortcut to PlayStates's camHUD. -
var camOther:FlxCameraA shortcut to PlayStates's camOther. -
var camFollow:FlxPointA shortcut to PlayStates's camFollow. -
var camFollowPos:FlxObjectA shortcut to PlayStates's camFollowPos. -
var boyfriend:BoyfriendA shortcut to PlayStates's boyfriend. -
var dad:CharacterA shortcut to PlayStates's dad. -
var gf:CharacterA shortcut to PlayStates's gf. -
var boyfriendGroup:FlxSpriteGroupA shortcut to PlayStates's boyfriendGroup. -
var dadGroup:FlxSpriteGroupA shortcut to PlayStates's dadGroup. -
var gfGroup:FlxSpriteGroupA shortcut to PlayStates's gfGroup. -
var notes:FlxTypedGroup<Note>A shortcut to PlayStates's notes. -
var strumLineNotes:FlxTypedGroup<StrumNote>A shortcut to PlayStates's strumLineNotes. -
var playerStrums:FlxTypedGroup<StrumNote>A shortcut to PlayStates's playerStrums. -
var opponentStrums:FlxTypedGroup<StrumNote>A shortcut to PlayStates's opponentStrums. -
var unspawnNotes:Array<Note>A shortcut to PlayStates's unspawnNotes.
-
function startCountdown()Called when PlayState's startCountdown is called, you can usereturn ScriptReturn.PAUSEto stop the function. -
function create()Called when the end of PlayState's create (createPost). -
function countdownTick(tick:Int)Called when a count down tick happens. -
function updateScore(missed:Bool)Called when PlayState's updateScore is called. -
function songStart()Called when PlayState's startSong is called. -
function eventEarlyTrigger()Called when PlayState's eventEarlyTrigger is called, return the amount of time (miliseconds) you want a event to be early by. -
function resume()Called when PlayState resumes the game. -
function pause()Called when PlayState pauses the game, you can usereturn ScriptReturn.PAUSEto stop the function. -
function spawnNote(note:Note)Called when PlayState creates a note. -
function updatePost(elapsed:Float)Called at the end of PlayState's update. -
function gameOver()Called when PlayState sends player to game over, you can usereturn ScriptReturn.PAUSEto stop the function. -
function event(name:String, val1:Dynamic, val2:Dynamic)Called when PlayState's triggerEventNote is called. -
function endSong()Called when PlayState's endSong is called, you can usereturn ScriptReturn.PAUSEto stop the function. -
function ghostTap(key:Int)Called when PlayState's detects a ghostTap. -
function noteMiss(note:Note)Called when PlayState's noteMiss is called. -
function noteMissPress(dir:Int)Called when PlayState's noteMissPress is called. -
function opponentNoteHit(note:Note)Called when PlayState's opponentNoteHit is called. -
function goodNoteHit(note:Note)Called when PlayState's goodNoteHit is called. -
function stepHit(step:Int)Called when PlayState's stepHit is called. -
function beatHit(beat:Int)Called when PlayState's beatHit is called. -
function recalculateRating()Called when PlayState's is called, you can usereturn ScriptReturn.PAUSEto stop the function. -
OVERRIDE
function add(obj:FlxBasic, ?front:Bool = false)Adds a object behind the characters, use front to add on top.