Getting started with addCustomCode

I’ve started working on customizing addCustomCode-based mechanics, and notice that a lot of the functions manipulate Selections, not SobGroups. Can anyone provide a breakdown of how selections work, if there’s any interaction between SobGroups and Selections, and what new things can be done with Selections that couldn’t be done before?

The context of what I’m trying to do in this specific case: I’d like to modify the code from the defense fighter so that it can be put on a combat ship, meaning it needs to attack not just nearby missiles, but it needs instead to add nearby missiles to the list of ships it was already attacking.But the code that currently attacks missiles creates and then attacks a selection, while the code that I know of to get the targets I’m already attacking deals in SobGroups entirely. I’m not sure how to go about reuniting these disparate worlds.

1 Like

Ooo, what is that code? That is what I have been trying to do…

EDIT: I had a conversation with @EatThePath on this, and he suspected such a function was in the Fulcrum Drone Frigate or the Kushan Drone Frigate - unfortunately this was not the case…