it might work out to make several duplicates of a single enemy and group them together in a folder or something. That way each enemy gets its own ID.
Let me know if this doesn't clear things up for you.
I can see that just making duplicates of the custom enemy could work, but it would lead to a lot
of duplication and code bloat.
for example if I wanted to test if any enemy reaches past an x coordinate and then change
direction of all enemies I might have to do
if enemy 1 x > 700 | enemy 2 x > 700 | enemy 3 x > 700 | enemy 4 x > 700 |
enemy 5 x > 700 | enemy 6 x > 700 | enemy 7 x > 700 | enemy 8 x > 700 |
enemy 9 x > 700 | enemy 10 x > 700
{
enemy 1 = left
enemy 2 = left
enemy 3 = left
enemy 4 = left
enemy 5 = left
enemy 6 = left
enemy 7 = left
enemy 8 = left
enemy 9 = left
enemy 10 = left
}
command code could be written in many places (e.g. timelines, custom enemy callbacks, area setting startup and looping), and any modification to code logic would need to be done in many
places and some places could be mistakenly missed, leading to errors.
Also if you add or delete an enemy the same would need to be done.
so I would prefer in the future to be able to write something like
if enemy 6 any x > 700
{
enemy 6 all = left
}