Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: fbeyrouti on September 05, 2013, 03:22:54 PM
-
Hi,
We noticed that the values of action variables are kept after exiting the state that was running the action. Therefore, we the state is re-entered again the action variables do not have their "initial" values. This is somewhat unintuitive because conceptually a state (and by extension state actions) "exists" only when it is active.
A workaround would be to reset all these variables OnExit but is there a better way?
-
Conceptually variables are scoped to the FSM. Quite often you need to loop through a state multiple times to perform complex operations, so it's convenient for variables to keep their state.
If you're writing your own actions and you want them to reset, you would have to do that in OnExit.