Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ben135 on April 01, 2014, 01:56:31 PM
-
Is there a way to store the number of times the trigger is activated on a specific gameobject into a variable?
-
You can send event to a new state with a float add, or float multiple add action that you can set to add 1.
You can then set a next frame event back to the trigger so that every time it is entered it adds 1 and goes back til it's triggered again.
-
My global variable of the triggercount seems to be storing values it gets from the previous runtime (after on/off). Is there a way to reset global variables to its initial value?
-
You can make an fsm that sets the value to 0 in a start state.
-
Hi,
you are experiencing a bug, so yes, I would simply force the global variable value to 0 when the game starts.
bye,
Jean
-
I tried setting up a state with the action "set float value" pointed to the global variable inside an empty game object in the start state. The action doesn't' get initiated. How can I fix that?
-
Does it give an error, and if so, what does it say?
-
There are no errors. The global variable just doesn't change to 0 when I run it. The action is never used while I watch the game run.
-
Not sure I follow, can you show a screen grab to see how the action is set up?