Hello,
In my game the player has an ability that slows down all onscreen enemies. When the player uses the ability, an event is sent to all enemies, and the variable that controls their movement speed is cut in half. My problem is getting the movement speed back to normal. I need the enemy's FSM to be able to use other states while in "slow mode". I'm not sure how to reset the movement speed variable after time has passed without forcing the FSM to stay in one state.
Is there a global timer of some kind I can use that will continue working in the background while the FSM shifts between states? My other thought was to create a separate FSM for all movement related states. Would that slow performance?
Thank you