Hi!
First of all it isn't clear for me, your code is written in C-Script or in Lite-C. Please clarify it.
I would do some changes in your code.
In these
- functions: action player1(),
- functions: action gegner(),
- functions: function move_plaser(),
- function move_procket()
- function action asteroid()
you defined two name values:
#define schaden skill51
#define health skill52.
Move both of them out from the functions, and put them for example before the
var Raketenzaehler = 0;
line.
I would change this function:
function remove_procket()
{
wait (1);
ent_create (explosion_pcx, my.x, asteroid_explodes); // create the explosion sprite
wait(1) // <-- INSERT THIS LINE
ent_remove(my);
}
I think if you insert that line, you give enough time to the
asteriod_explodes function to do its duties.
I am sure my proposals will not make your program work.
But i hope will make better and eliminate some bugs/mistakes.
Edit: I recognised right now you posted it into the Lite-C forum, so your code is in that language.