Well, I start my script, spawn some fairies and then run a loop that cause a variable called "FogEnd" to increase by 100 one hundred times.
let FogEnd = 500;
In MainTask:
Wait(200);
loop(5){FairyWave1(GetClipMinX+Test,1,1); Test+=80;}
Test = 0; Wait(20);
loop(4){FairyWave1(GetClipMinX+70+Test,1,1); Test+=80;}
WaitForZeroEnemy;
Wait(200);
loop(100){FogEnd+=100;Wait(5);}
Then, @Background, I control the "SetFog" like this...
if(CurBG == 0){
WriteZBuffer(true);
UseZBuffer(true);
SetFog(0, FogEnd, 0, 0, 0);
SetViewFrom(600,90, -80);
...and the scripts slows down massively just in while the looping is being processed. After that, everything runs normal.
I'm aware that using looping in 3D Drawing consumes lots of processing power, but is there any other way to make this work?
EDIT: Also, how does the Explosion01 function is used? I already placed it in my script and does nothing...