Closed kfpopeye closed 2 years ago
Maybe a stupid question, but when you used the code from the docs as is... have you maybe had a screen driver install on your computer? Like, cuz the samples of the docs first try to get a reference to a screen driver and only then do they try to get a screen in the component network, so maybe just didnt notice that it was actuallly drawing to the screen driver
Yes I have a screen driver on each computer. I was just wondering if because the code above works there might be something wrong going on. The code shouldn't work because I never find a reference to the screen.
the above code makes sense... it would be better if you share the code that does not work... because if you use the same code for getting the screen as in the docs... you may have used the screen driver instead of the large screen (the screen driver is used to add a "screen" tab to the UI of the computer), because the code in the docs will use the screen driver if available and if that is not available then it uses the large screen
Does gpu:bindScreen(nil) just grab the first screen it can find then?
PLz refrain from using this a means of Q&A ^^ Thats something for our discord server ^^
And nope, that would simply unbind the screen from the gpu if the gpu is bound to any
I have no idea why but the code below works. I purposely sabotaged the part about getting the screen but it still displays info to the screen.
The story I originally copied parts of your "Random Plot" example and used this to get the screen: component.findComponent(findClass("Screen"))[1] which worked fine but when I tried the exact same setup at 4 other train stations nothing would display on the screen. When I switched to addressing the screen directly (IE/ component.proxy("B58895234477BC6EC6C3FCAC68B3A392")) then all the screens worked properly. So I thought maybe findClass() was returning ALL screens in the game but it doesn't after all.