mr magoo Posted September 23, 2017 Posted September 23, 2017 (edited) I've made another class that aids me in getting some work done in my script, but I need it to sleep as it would if all my code was in the main class. Is this possible? Normally I would do import main; but it doesn't work in this case. The sleep function comes from the Script extension of main. Thank you for your time Edited September 23, 2017 by mr magoo
dreameo Posted September 23, 2017 Posted September 23, 2017 You can make your own sleep method by utilizing a Timer class.
Satire Posted September 23, 2017 Posted September 23, 2017 Read up on constructors. You need to pass the scripts instance to every class that needs to use it.
Novak Posted September 24, 2017 Posted September 24, 2017 (edited) MethodProvider.sleep Edited September 24, 2017 by Novak
FrostBug Posted September 24, 2017 Posted September 24, 2017 1 hour ago, mr magoo said: I've made another class that aids me in getting some work done in my script, but I need it to sleep as it would if all my code was in the main class. Is this possible? Normally I would do import main; but it doesn't work in this case. The sleep function comes from the Script extension of main. Thank you for your time It's a static method. You don't need an instance