Skip to content

PlayState vars require "PlayState." before them in song scripts #566

Discussion options

You must be logged in to vote

You gotta place PlayState. before the variable names because those variables are static
everytime you wanna access a static variable in a script from somewhere in the code (excluded scripts) you always gotta do it (in this case with PlayState)
you can see which variables are static either in the api or in the actual code

everytime you get variables in song scripts for example if you dont specify where they're from (for example like PlayState.SONG you're specifying that its from PlayState) it defaults to PlayState.instance.yourVariable
Thats because scripts parents are the class' instance and so everything it tries to get from the outside it defaults to either that or inside the script UNL…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@THEkatinamicrowave
Comment options

Comment options

You must be logged in to vote
7 replies
@NexIsDumb
Comment options

@THEkatinamicrowave
Comment options

@NexIsDumb
Comment options

@THEkatinamicrowave
Comment options

@NexIsDumb
Comment options

Answer selected by THEkatinamicrowave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants