How do you remove specific element from array?

If there is an array that has 10 elements of creatures, and if one of them exit from the mutator zone, it can be removed from array automatically. But how??? the important thing is, must know what the index number(that the creature has) is.

the process is:

  1. initialize creatures in array when they has spawned.
  2. When they enter in the mutator zone, print the element index number of entered creature.
  3. Remove element when they exit.
    so you don’t know which creature is about to exit. It means I need to use variable for that, But I have no clue FOR REAL… can you guys help me plz?

You can use this method to find the index of the agent (since agent is comparable)

    # Returns the first index whose element in `Input` equals `ElementToFind`.
    # Fails if ElementToFind does not exist in the array.
    (Input:[]t where t:subtype(comparable)).Find<public>(ElementToFind:t)<computes><decides>:int = external {}

Then in your example just replace 0 with the found index :+1: