Hello everyone.
I’m trying to learn the new Mass system. Specifically the CrowdAI system. I followed various tutorials and now i have some agents walking around following a zone graph.
Now i would like to Build out their MassStateMachine, so that i can add some more intresting AI logic. IE following the player once some condition is met, probably triggered by a statemachine event.
Ideally this event should be triggered by the blueprint layer.
Now i added a utility function to blueprints which can get the entityId and print it. all good.
My assumtion was that i could probably use this entity id, or similar logic to get the MassStatemachine and trigger SendEvent directly to it.
Buuut i’m starting to think this is not the correct approach - I atleast cannot think of a data-oriented way to get the MassStatemachine of a given entity
Now my theory is i could create processor, which would operate on entities using a statemachine and maybe with a given tag. Then i could add a tag to the engity, which i can then use in the processor to trigger a state change and remove said tag again - not quite scalable for different tags, but would be a start.
Has anyone done anything similar ? Do you have some tips or can anyone point me in the right direction ? Cheers thanks!