I guess I must be pretty dim, because I thought PM was exactly what I needed, being useless at code. It looks EXACTLY what I need, but, seriously, unless I can understand its logic (which currently I can't), I have thrown away my money.
I set up a couple of test states to try to understand the logic what the hell is happening.
State 1: Find Closest (food object - store in variable); Next Frame Event (FINISHED) transitions to...
State 2: Move Towards (the object stored in State 1); Next Frame Event (FINISHED) transistions back to State 1.
This is what I expected to happen:
Agent (the sphere) stores the closest food object and starts moving towards it. If another food appears which is closer, it will move to the second food instead, ignoring any further away, and so on. Finally, it will push against one food as the two states rapidly oscillate.
Alternatively, I thought this might happen:
Agent stores the closest food object and moves all the way towards it. It effectively ignores any other food objects because it is now touching the first food object and so all others will be further away.
In fact, what happens is this:
Agent stores the first food object and starts moving towards it. If another food object appears, it changes and moves towards that instead - even if it is further away. Even after it collides with a food object, it will go after the next food object placed. Sometimes, if you have about five or more food objects, it starts to move randomly from one to another (not normally the closest). Like so:
https://www.flickr.com/photos/120865053@N02/13971131102/Seriously, I must be missing some basic logic on how this works, because this is just two states. Four actions. Surely nothing complicated at all. Please, before I wave farewell to the money I spent on this (and my sanity), could someone try to explain to me how this works?
(Incidentally, can someone also explain how I'm supposed to use debug log, because this action doesn't seem to do anything. Also, as I said elsewhere, the log window doesn't show variable values for the selected state as it claims - only the current value regardless of what state is selected.)