Remove Gameplay Tags in State Tree

Ive been following An AI State Tree tutorial series and ive hit a snag.

The series ends on getting the AI to follow you but I cant seem to get it to stop following the player. I think its due to the AI Sense Tag still being present even when the player is now out of sight but I cant figure out how to remove that gameplay tag.

ive searched The Remove Gameplay Tag node but it has containers, which haven’t been used in the tutorial, so im lost. any ideas?

Screenshot setting the tag

My transition logic to stop patrolling and to follow the player

Is first screenshot from your AI controller? And if so, is that function fired off from the OnTargetPerceptionUpdated event?

Hi,

No it is a global task in the AI State tree but it does use the AI Perception system in the AI Controller.

I’ve solved it, I thought that gameplay tags were permanent once applied until they were removed. I didn’t realise the tags were only part of that one event that was triggered.

I made another event for the player being lost if not successfully sensed and routed the state tree branch transition back to route