You seem to be accessing emissile both globally and locally within the firemissile function.
That can't be right... can it?
I also think that the firetorp function doesn't seem to do anything than simply call firemissile.
What does it add?
I'm not saying either of these will solve your problem but it's poor coding and that can lead to 'odd' problems like the ones you are having.
That can't be right... can it?
I also think that the firetorp function doesn't seem to do anything than simply call firemissile.
What does it add?
I'm not saying either of these will solve your problem but it's poor coding and that can lead to 'odd' problems like the ones you are having.