Here is the only action i need with A*. That allows you to change the target destination (works with the “destination setter” component) It can also be done with the “set property” action. Hope it can help.
using UnityEngine;
using HutongGames.PlayMaker;
using Pathfinding;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.ScriptControl)]
[Tooltip("Change the target of an A* AI agent.")]
public class AstarDestination : FsmStateAction
{
[RequiredField]
[Tooltip("The GameObject containing the AIDestinationSetter component.")]
public FsmGameObject MovingObject;
[RequiredField]
[Tooltip("The new target to set for the A* AI agent.")]
public FsmGameObject DestinationObject;
private AIDestinationSetter aiDestinationSetter;
public override void OnEnter()
{
aiDestinationSetter = MovingObject.Value?.GetComponent<AIDestinationSetter>();
if (aiDestinationSetter != null)
{
aiDestinationSetter.target = DestinationObject.Value?.transform;
}
Finish();
}
}
}