Thanks :-) The call to dead was the problem. I took out dead and it works 100% :-)
Well not 100%, now the bullet lives on and kills other enemies.....I have to think about the correct solution...
Code:
If (Sprite is TEnimy) then
begin
Sprite.Collisioned := False;
Sprite.Dead;
Enimies := Enimies -1;
Form1.DXWaveList1.Items.Find('hit').Play(False);
// Image change
Image := Form1.DXImageList1.Items.Find('Explode');
Width := Image.Width;
Height := Image.Height;
AnimCount := Image.PatternCount;
AnimLooped := true;
AnimSpeed := 15/1000;
AnimPos := 0;
Points := Points + 1000;
Done := False;
end;
Bookmarks