i have not tried setting a high warn_level but there was 1 single instance where i got a "script crash in enemy" error and the game could continue afterwards and the enemy that crashed did nothing afterwards, however the game froze a little later when hitting another enemy.

i have actually managed to fix the problem by putting a 1 second delay before removing the enemy entity. i guess the problem has something to do with the entity being accessed when its removed or something like that but im still not sure what excactly the problem was.

i also tried removing the effect commands from the events as i read that it was not a good idea in the manual, but it didnt seem to do any difference here.