This repository was archived by the owner on Dec 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Stage Script
skellypupper edited this page May 28, 2023
·
15 revisions
Stage scripts are used to create stages.
Make a stage script at assets/stages/<stagenamehere>/init.hxs
, you can also put your stage assets in this directory.
Make your sprites and add them via the add
function.
-
stage
: The current stage class (an extendedFlxTypedGroup
). Used to edit your stage. -
stage.publicSprites
: AMap
for public sprite variables. Add sprites here if you want to mess with them outside of the stage script. -
stage.foreground
: AFlxTypedGroup
that gets added after the rest of the sprites. -
stage.infrontOfGf
: AFlxTypedGroup
that gets added in front of girlfriend. (i hate limo so much) -
Paths
: A custom paths instance that only reads for files inside the<stagenamehere>
directory. -
_Paths
: The global paths instance.
-
PlayState.defaultCamZoom
: A float value for how zoomed in the camera is on your stage. (default: 1.05) -
PlayState.curUi
: A string value for which ui type (strums, notes and combo) should be used. (Game comes with support for "normal" and "pixel") -
PlayState.startOn
: A dynamic value that allows you to set where the camera begins at on your stage, this can be set tobf
,gf
,dad
or a 2 float value array. -
PlayState.moveCam(val:Dynamic)
: Same as above, but it's a function you can call mid-game.
-
create()
: This is where you actually create all your stage variables.
-
createPost()
: A function called after bf (PlayState.bf
), gf (PlayState.gf
) and dad (PlayState.dad
) are created, use this function to reposition your characters. -
stepHit(step:Int)
: Called every time a step is hit from the PlayState. Good for making background characters bop. -
beatHit(beat:Int)
: Called every time a beat is hit from the PlayState. -
update(elapsed:Float)
: Called every frame.
Written for EE v1.1.0