Second unit is always showing busy and prevents switching back to first unit

For some reason after this project, the first unit runs perfectly. the second unit however isn’t setting “isBusy” to false ever. I know this because I added Debug.Log to the if statement that checks for “isBusy”

if(isBusy){Debug.Log("AmBusy");return; }

I’m sure you will need to see more code than this to help me fix it, but i’m not sure which pieces to show.

Is this the Player units or the Enemy units?

If it’s the Player units, does the second unit perform the selected Action?

Are there any error messages in the console?

Went to sleep, woke up, and the answer hit me like a train. I had SetBusy() in the wrong spot. So it was setting busy on unit selection then not allowing anything to happen because it was busy. I stared at that problem for 2 hours before posting here. Man do I feel foolish.

Oh, I’ve done stuff like that plenty of times. The great thing about code is it will do exactly what you tell it to. The bad thing about code is it will do exactly what you tell it to.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms