If one point is taken go the other point. Quick fix?

Hello everybody,

I know that this is one of the questions I should be able to resolve after almost one year of coding, but this project is endless and has so much in it, so looking for help here:

How can I write the logic for if one way point from the array of transform points is taken the AI goes to the next in line?

Thanks

Taken by another AI I’m assuming? Just make a small info class for each point with a reference to a transform and an taken bool. If you want to get really fancy make is a serializable class and it will display nicely in a list and you can still reference your transforms in the inspector.

Then it’s as simple as looping through the list until you find a taken == false and go there and set taken to true. Reset it when you leave.

Many ways. You could store a seperate array of bools of the same length. A bool at any given index could represent whether the transform point at that same index in the other array is taken or not.

Or you instead of storing an array of transform points you could store a struct that has a transform point and a bool.

Either of those sound good?