"Remove" string node not working as inteded?

Basically, im getting all level sequences with a specific name and putting it into an array then into a variable. Then, I’m getting everything in the location, regardless of name and putting that into an array. Im trying to use the remove string node to remove everything that is in the level sequence array from the everything array so I’m left with things that haven’t been created. However, it seems to only wants to remove random things, even though after checking multiple times, the name should be removed. Any ideas?

Steps:

  1. Find all sequences with _Lighting, _FX, _Master in the name
  2. Find everything with _Lighting, _FX, _Master in the name
  3. Remove everything found from first in the second array

When removing from an array you have to loop backwards, otherwise the array indexes are changing while you’re trying to process it… :wink:

In findingseqwithname.png you’re looping over all matching assets, setting “New Var 2” to an array with just that asset in it, then looping over that one element and setting the variable “Existing Sequences” to the name of that asset.

In foundall.png “All Lighting Array” “All FX Array” “All Master Array” are not arrays, they are single strings.

In final.png you’re removing the name of whichever was the last asset processed in the loop and removing that from the Everything Else array.

I’d suggest changing “All Lighting Array” “All FX Array” “All Master Array” variables into arrays and then looking at the errors and changing the logic there to Add and Remove elements to them.