I am trying to make it so it doesn’t teleport you back until you kill all the enemy’s,
I am trying to make it so it doesn’t teleport you back until you kill all the enemy’s
then you need to have a check to see if all enemies are dead. how you do this will depend on the situation, if its in a given area then you will need something like a array which lists the enemies, if its enemies in the entire level then you could use the get all of class. to be specific though we would need to know the context.
the short version is insert a branch between your cast and the rest of your script then have your condition to be met be the bool input. the condition could be something like: enemy list array → get length → length > 0. then you would just need a way to remove indexes from the array when a enemy dies.
oh and on a side try to avoid posting foul language (as seen in your picture).