If special effects get stuck after spells/nonspells, you can add a check to automatically delete the object if the boss isn't alive or rather if the boss's object has been deleted.
Something like,
while(!Obj_IsDeleted(whateverthebossobjectis)){
yield;
}
Obj_Delete(whatevertheobjectis);
}
I've tried that, but for some reason it doesn't work, you can see it being used in my script, but it won't actually perform it. Maybe I'm adding it in the wrong place, but I've placed in many parts of each task and they still won't work. Weird...
Great script, though the concentration effect and the weird extra script attached to the end were a little out of place.
A little bit of advice.
Thanks, I've fixed the little bit at the end. I had a hard time with the concentration effects generally as well, as you already know. Although I have fixed the problem, it's caused another one. Because SetAutoDeleteObject stands for the whole script, every time one nonspell or spellcard is beateb, the STG Frame, Enemy Marker, Difficulty Banner etc, delete also. I've tried using a task to call it back at the beginning of the next step, but you can still see the removal of the effects after each step finishes. I have no idea of how to fix this, because I don't think that there is a function with the equal use of SetAutoDeleteObject but for one object.
EDIT: I DID IT! Thank you everyone!
YAY! I did it! All I needed to do was make sure that the loop only carried out while the boss was alive, similar to Ultima's idea. The problem was, I moved the loop checking if the boss was alive so it could fire after the loop, to after the loop, meaning that the whole loop would still carry out afterwards, even if the boss died, and would only stop once the loop had carried out. After an hour of coding random crap, I finally got the idea, with your help. Don't worry though, the problem is being fixed and the link will be up hopefully today, latest tomorrow. Thank you everyone!!!!