Noesis wrote:only when the system is running under load (i.e CPU & GPU maxing usage).
Rather than split the loops into different scripts (which I'd have thought would work btw) perhaps incorporate them all into a single routine instead would help, and/or using a timer instead of the loops could help here.
...so increasing the sleeps to 15, 20, 30 each could possibly help.
My system isn't under a very heavy load for that game, I've got one logical core (out of 8) at 80% and gpu around 30%.
I tried removing all but one of the routines to rule out interference between them, and it gets stuck anyway, so reworking them into a single one wouldn't help. Maybe I can try a timer/counter (and add to it while I keep the button pressed?).
I've tried increasing the sleep delays, it doesn't help at all, if anything it gets worse (but in the other direction it doesn't get better if I decrease the delays to 5 or 1).