Hello everyone.

Let's say I'm running a mission that currently has over 1000 running scripts (diag_activeScripts#0 > 1000): for"_i" from 0 to 1000 do { [] spawn { while {true} do { for "_i" from 0 to 50000 do {true} } } }
Each iteration of every script requires about 20 ms to complete, which is well above the scheduler's execution time limit (3 ms). This practically means that if my game is running @60 FPS (16.6 ms per frame) and I have a script at the 1001st position in the queue, it will be executed at least over ~17 seconds later! And this is just the first iteration of my script. There will be a ~17s delay between each iteration.

This is only a stress test of course, but still I'd rather my scripts were executed ASAP. I don't mean like 'call', because my scripts are way too demanding for calling. They have to be executed in the scheduled environment.

I can think of a dirty method (using a perFrame eventHandler, and executing the code bit by bit), but I was hoping for a more straightforward solution.

Does anyone know a way?