Hey all! New to Playmaker but am LOVING it so far!
This might be a noob question but I am making a simple mobile game where you can allocate population to various tasks like "hunt", "research", etc based on how many pop points you have.
So far, I've set it up so that when you click on the Population icon, it will enter a state called "Allocating population". It will then send an event to the possible buttons you can click to allocate population there.
However, I want to make it so that when you click anywhere on the UI that isn't one of those buttons, it will exit the "Allocating population" state. But when you do click one of those buttons to allocate a pop there, it won't exit that state so that you can click multiple times and allocate several pop to the same thing until you click somewhere else to exit that state. But I'm not entirely sure how to best achieve this...
The best idea I've come up with so far is:
On the pop icon, set it so that on a UI CLICK, you enter Allocating pop state. This will send a global event to another FSM that's on an empty game object in the hierarchy. It will then enter a state called "is allocating". On there, there's a transition on UI CLICK that goes to a state that uses UI Get Last Pointer Data Info. It can then somehow check if the item clicked was one of the things you can allocate pop to. If it wasn't then it will exit the is allocating-state.
This seems a bit complex, is there an easier way of doing this?