If enemy dies, do this

I do not know how to say in javascript that all the enemies died (as a condition). When all the enemies die, I want the teleporter to activate, but I don’t know what to put in the if statement’s parentheses to convey that.

If you know how many enemies that you start with and if you know how many enemies have died so far, you can check if the number of enemies died is equal to the number of enemies that you started with and show the teleporter.

Oh, never mind, I fixed it. I was using findByTag instead of findByName. Any idea why findByTag wouldn’t work to find an entity?

findByTag returns an array IIRC whereas findByEntity returns the first entity it finds that has the name.

Is there any other command that returns the first entity found?

Why not use the first entry in the array from findByTag?

How do I tell it to do that?

You get the array of entities found by findByTag and you access the first element of that array.