Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: jess84 on August 08, 2014, 07:47:25 AM
-
Would it be possible to have an action to reset all local variables on the current FSM?
Since I've started using a Pool Manager to spawn/despawn some objects, I've noticed bugs occurring because any FSM variables aren't reset - so I end up with objects increasing in size each time they're spawned again, or if I've got an object with a float to set it's opacity over time, it starts off invisible.
Right now I'm manually going through and resetting local variables on the start state, but this is quite laborious, and could lead to missing something and therefore bugs!
-
Hi,
have you tried to disable enable it, there is a check box "Reset on disable" that is on by default that will do for your case I think.
Bye,
Jean
-
Hi,
I already have Reset On Disable checked. It restarts the FSM to the start state fine, but local variables values remain are carried over.
So when I have a float add, the second time the spawned, the float value will be double what is intended.
Reset on Disable does not reset local variable values.
-
Hi,
uhm, odd, I can reproduce here, I have submitted a bug report, we'll see. I'll keep you up to date and create a custom action if it turns out we need this.
Bye,
Jean
-
thanks Jean.
It wasn't too much of a problem when I was dealing with objects with 1 local variable, but I discovered a few with a lot - that's a lot of setting floats otherwise :)
-
Did you ever fix this?
I am having the same issue!
-
Hi,
Let me ping Alex on this.
Bye,
Jean
-
Any progress with this?
-
Hi,
Reset on disable only affects the active state, not the variables.
Unfortunatly, I haven't found a good way to set it up. I would need a proxy to save data on awake, so it would be a tricky setup.
currently, when I have to deal with this, I force values on start states, so that I know that everytime I enter this state, my fsm variables get set to the right values.
I can let you "reset" a given number o variables to null, blank or 0, but that's not the same as reverting values to their original values set during editing.
Bye,
Jean
-
I can let you "reset" a given number o variables to null, blank or 0
Yes, please ;D
Oh, i see there's an action for that, will try it out.
-
Sorry for necroing this, but... has there been any progress in supporting resetting local variables to their default/edit mode values?
Needing to set every single variable at the Start state is freakingly inconvenient and prone to errors.
Btw...
I can let you "reset" a given number o variables to null, blank or 0
Yes, please ;D
Oh, i see there's an action for that, will try it out.
...what action do you mean to? I didn't find anything relevant with the words "reset" or "variables" on the Ecosystem.
-
Install the beta, it has that option.
-
Oh damn! Thanks!
-
I mean, they'll reset to defaults if that's what you're looking for, no option for blanking out.
-
Yeah, I'd like they reset to the values they have on the variables tab, before entering Game Mode.
Is that what it does, right?
-
Yes :)
-
Hi there,
how is this action called? It seems like a super useful one!
CanĀ“t find anything on the ecosystem so far. (having the most recent versions of Playmaker & ecosystem)