Anyways, for anyone that's still here I will start explaining the Wall-E script I made.

These are all the different states that he can have, Arrive is a behavior that simply goes to the target and then stops. Idle is basically the same as not-set since it's not an actual state but more of a default state.

There are a couple of things that keep track of what the AI is supposed to do at what point so these couple variables keep track of that, it has comments so it should be clear what it all means.

I also have a couple of variables that indicate the locations that the AI can go to and has to know to function.

The AI also has a different piece of code for every different behavior, since the 'void' types are all almost the exact same I will only show one here:

I will show the different Coroutines since most of them are unique to one behavior.

LookForTrash does exactly what it describes, it is just looking for trash in a certain radius around it for objects in a specific layer and if it's power is too low or it's too late it will go home.

If a target has been found it will make sure that it contains what the AI needs and if that is true then it will go towards it.

Once it has reached the trash it will start cleaning it, which takes a certain amount of time. Cleaning also costs power but at least once it has enough trash it can leave this place to go clean another one.

Another Coroutine that does nothing more than check if the hours are equal to the wake up time so it can go charge.

Another Coroutine, this one charges the AI to get ready for the day. It will gradually gain more power until the power is 100 and then it will start wandering again.