So, the fault in my thinking was to assume that once a list was made of the devices of a given ship, it would pick the requested device from the list later on instead of reading that, yes, there's something in that list.
Well, when you collect stuff in a list (like, all devices of a specific ship), then the game won't magically select the right object for you later on. The command(s) you put in an ExecList() will be executed once for each object of the list. If you only want them to be executed for specific objects, then you'll either need to make sure to only gather these desired objects in that list and nothing else... or you'll need to put some additional conditions inside your ExecList(), like for example:
ExecList(11,
If(s.devType = #eng_bFusEng,
DoSomething(),
DoSomethingElse()
);
);
But by using the "s.this" statement, would it be possible to put multiple devices in it?
The content of s.this may change during the execution of ExecList() or similar commands, because ExecList() loops over all the items on the list and executes the embedded command(s) for each of them, one at a time. So s.this already refers to these multiple devices, just one at a time and not all at once.
Or should I create a device selection and a consequential execlist command as many times as I need the attacker to target specific devices? In short, I want the attacker to target 2 or even 3 devices at once.
As far as I understand it, you'd just need to run the FocusDevice()-command once for each device, with the last parameter set to 1. You can do this in one ExecList(), if you previously selected exactly these 2 or 3 devices in one list. E.g.:
SelectDevices(11, M.PShip.0, s.devType = 74 | s.devType = 81 | s.devType = 99);
This'd select all the devices of these three different DEVICETYPEs on that one ship, which you could then focus fire on by using a single ExecList() like I wrote in my last post.