shared variables between actions
Is there any way to do this? I've got a system that plays videos, but from mulitple actions - I wanna be able to make a queue system so they play one after another.
10 Replies
currently I'm using this system:
basically adding a check during my
if
statement to check if the overlay is enabled
turns out - it isn't working as intended. I just want it to fail the if statement, but it seems like it just queues the video somehowYou're missing a key concept of OOP it seems: Objects can have fields and properties.
You don't have enough code or explanation to go in the details, but for example, you could have a field/property at the class level (outside of the method's scope) that would be your queue, and you would add/remove items into that object.
and where would I put that class?
I'm self-taught, I have no idea what the heck that means
As long as your instance of that class lives, these members will persist.
yeah but where?
if I put the class in this action
would scripts in other actions be able to access it?
What scripts? What actions?
These aren't things in C#.
ah crap
wrong discord I just noticed
🤦♂️
(Well,
Action<T>
is, but I don't think you're talking about that.)sorry mate, I posted wrong discord, I'm working on a script for a program called Streamer.bot
Oh. Alright. Have fun!