#How can if check if a list variable contains ANY objects that have a specific tag without a loop?

1 messages · Page 1 of 1 (latest)

dawn pulsar
#

So I have a recroom object list and a bunch of cubes. red cubes have the "red" tag blue cubes have the "blue" tag etc . I want to check the list to see if it contains ANY red cubes. how can I do that WITHOUT iterating over all the cubes in the list checking what tag they have?

meager pilot
#

you will have to use a loop of sorts to accomplish what youre wanting to do

#

note: a loop of sorts

#

it doesnt have to be explicitly the stock for loop chips

#

you could make your own loop that does the operation over multiple frames when necessary

tranquil onyx
#

If the list gets made during gameplay, you could throw a "Cubes Changed" event receiver in there?

swift wedge
#

Can’t you just use a list contains??

tranquil onyx
#

Yes, but you'd have to do it for each of them.

#

By "loop" they mean the loop output of a for or for each chip (i think)

small anvil
tranquil onyx
#

Oh right, if these are the only objects in the room that will ever get the "red" tag, you could always just use a "get all with tag" and a list get count, then an equals