As you say, signals are more tenacious than most other ways of running scripts.gnasirator wrote:Hmm seems, like there's still a signal link active for SIGNAL_ATTACKED.
I don't know, how to fix this for good. ... I can't think of a way to automatically remove those links if a ship which was used as an explorer before now does something else ...
maybe someone else has an idea (Bullwinkle?)
I see that you connect SIGNAL_ATTACKED in .scanEnemies. You have a commented-out line directly below it (test code?) that should restore the signal. So use that when the player turns off Galaxy Explorer.
HOWEVER, I think that you should really be using secondary signals here. As far as I can tell, secondary signals are preferred. So use Add/Remove Secondary Signal... instead of "Connect Ship Command/Signal".
Regarding fixing explorers that have already been created, I do not know your code well. What if you were to loop through all explorers and Set the Command/Signal behavior to default? You could do that in the setup file to clear the potentially bad signals.
Then re-apply the new secondary signal map in .scanEnemies. Then clear the secondary signal map when the player turns off Galaxy Explorer on that ship.
As a bonus, you can remove all secondary signal maps with a single command (Global secondary signal map: remove signal), which may be useful in the future.
Does that help?
@PromX: You can use Super Script Killer (SSK) to fix your Hyperion.
- (Undock any docked fighters before you use the hotkey).