All I need to do is to pick a new target and if it’s the same as the last target, pick again until it’s something different. So why isn’t this working?
Essentially I’m taking the current target and copying it to Previous Target. Then I’m getting a list of all of our goal locations. If this is zero, then I’m just setting my current target to zero and leaving. Otherwise, I’m getting a random number based on the number of entries in our array. If this isn’t the same as our previous target, then set the current target to it. However, if it IS the same as the previous target, then call the function again to pick another target.
This is my second rewrite to this function, and it still isn’t working. I know it’s real late, and I’m real tired, but where is my logic going wrong?? This should be VERY SIMPLE! So why is it not working?