GPSwap Posted July 31, 2017 Posted July 31, 2017 (edited) Taken a different approach to the whole action and made a work around, thanks for the imput Edited July 31, 2017 by GPSwap
The Hero of Time Posted July 31, 2017 Posted July 31, 2017 ... put a message after the conditional sleep code?
Juggles Posted July 31, 2017 Posted July 31, 2017 7 minutes ago, The Hero of Time said: ... put a message after the conditional sleep code?
GPSwap Posted July 31, 2017 Author Posted July 31, 2017 (edited) 13 minutes ago, The Hero of Time said: ... put a message after the conditional sleep code? No I want the condition sleep to end because of a game message Edited July 31, 2017 by GPSwap
IDontEB Posted July 31, 2017 Posted July 31, 2017 listen to chatbox for a message and turn a variable true when that message is received and then have your conditional sleep until that boolean is true 1
GPSwap Posted July 31, 2017 Author Posted July 31, 2017 22 minutes ago, IDontEvenBot said: listen to chatbox for a message and turn a variable true when that message is received and then have your conditional sleep until that boolean is true Tried this when I first had the issue, and it wouldnt work it would wait till the end of the sleep Taken a different approach to the whole action and made a work around, thanks for the imput
The Hero of Time Posted July 31, 2017 Posted July 31, 2017 29 minutes ago, GPSwap said: No I want the condition sleep to end because of a game message ooh sorry i misunderstood 1
IDontEB Posted July 31, 2017 Posted July 31, 2017 9 hours ago, GPSwap said: Tried this when I first had the issue, and it wouldnt work it would wait till the end of the sleep Taken a different approach to the whole action and made a work around, thanks for the imput If it doesnt work its likely that the conditional sleep caches the value of the boolean and doesnt check if it's changed so make it a volatile Boolean and that should work, I think!
GPSwap Posted July 31, 2017 Author Posted July 31, 2017 3 minutes ago, IDontEvenBot said: If it doesnt work its likely that the conditional sleep caches the value of the boolean and doesnt check if it's changed so make it a volatile Boolean and that should work, I think! well I found a work around for it but il keep that in mind for the future thanks bro
Explv Posted July 31, 2017 Posted July 31, 2017 (edited) 12 minutes ago, IDontEvenBot said: If it doesnt work its likely that the conditional sleep caches the value of the boolean and doesnt check if it's changed so make it a volatile Boolean and that should work, I think! I think it's because the conditional sleep blocks the thread, and so onMessage isn't called until it finishes. Pretty sure ConditonalSleep doesn't cache anything because that would kind of defeat the point... Edited July 31, 2017 by Explv 1
IDontEB Posted July 31, 2017 Posted July 31, 2017 12 minutes ago, Explv said: I think it's because the conditional sleep blocks the thread, and so onMessage isn't called until it finishes. Pretty sure ConditonalSleep doesn't cache anything because that would kind of defeat the point... Ahh forgot the purpose so yeah it doesnt make sense!