Hi,
So I'm having a hard time designing my managers in a way that won't be error-prone.
My issue is with managers that can be called from many other FSMs at the same time. Let me use a stats manager as an example. The manager is responsible for modifying the stats of the player, such as total damage and attack speed.
Let's say I have a weapon, and when I equip it the player's stats need to be modified. The weapon first sends an event to modify the total damage and then modify the attack speed.
How do I make sure the stats manager are finished with the first event. I can of course just use something simple as a bool test. But as this gets more complicated when there are other FSMs that can call the stats manager - such as buffs that add damage, curses that reduce damage, etc.
Also possible to just have the weapons themsleves modify that stats, but it gets harder to debug as you don't know what FSM modified the stats.
While it might be fairly low chance that it all happens on the same frame, it's still possible.
How would one go about designing this? Is it possible to somehow queue this up? Is it necessary?
EDIT: I might have my answer here:
https://hutonggames.com/playmakerforum/index.php?topic=13603.msg63269#msg63269Which is basically to just set the data from the item itself and not use a manager.