I’m know it’s a pretty trivial task, I’m know I can make a function of it, I just wanna know if GDSCRIPT already has a native one line approach for it.
for python I found this: Test if lists share any items in python - Stack Overflow
array1 = [] array2 = [] func _process(delta): for i in array1: for o in array2: if i == o: print("yes")
Remember to break after one match was found, so that the CPU doesn’t waste time comparing elements after one set of elements was found to be matching.
break
Calinou | 2021-08-02 22:14