more like... moveTo was the only command that worked without causing the FSM to terminate!
It would seem that moveTo and setDestination are both for scripted FSMs specifically although can be used in a script. The moveTo command initiates a "low-level" movement order... and I mean "order" in a very loose sense. See, FSMs are like orders themselves. Thus, if you doMove or commandMove you are changing the order for the unit(s) and thus the FSM kaputs. I think moveTo actively makes a unit move, but setDestination sets a target destination (like the yellow box you see in Cadet mode for the formation) and allows the engine to move the unit otherwise.
Sorry for the bump.
Thanks for this usefull piece of information, Crashdome!
It explains much of the issues I had yesterday.
I use FSMs for dynamic "mission" given to AI. The one I was building yesterday was a simple "go to objective X position" FSM ordered to a group. It is to check distance to objective, go on foot if close enough, otherwise try to find an available empty vehicle nearby, and if not, ask for transport.
I had issues with the second part of the FSM logic : when a free vehicle is found nearby, I set 1 driver, group leader as gunner if any, and the rest of the group as cargo, using AssignAs.... . When I used pseudo-FSM (sqf scripts) I could use the
group move position command, and the units use their assigned vehicle for transport automatically, no need to order them to move, get in vehicle, etc... With .fsm,
move command does not work, and moveTo is individual and engine doesn't take advantage of assigned vehicles for transport, they run away on foot.
I'll try with setDestination, perhaps it will use assignedVehicles, but the Wiki description seems to imply this command is to use for choppers (reference to pilot, obscure "planningMode" & "reforcePlan" parameters, etc...)
Otherwise I'm stuck with sqf pseudo-fsm, I'm afraid.