Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Kaneydien on April 11, 2013, 10:48:53 AM

Title: Changing Global Variables on different FSM's(solved)
Post by: Kaneydien on April 11, 2013, 10:48:53 AM
Hi everyone, I am trying to figure something out.
I have 2 different game managers.
The first one sets a GUI, and displays an INT number from a global variable.
The second game manager has a state that does an INT ADD, and changes a global variable that is showing on the first game managers gui.
When I change the global int on the 2nd game manager, it does not update the gui on the first game manager.
How can I get this to work?
I hope this makes sense.
Title: Re: Changing Global Variables on different FSM's
Post by: Lane on April 11, 2013, 11:27:21 AM
If you're using GUILayout Int Label and selecting the global then it should reflect any changes to that int.

The other FSM can make any change to the int by Int Add/Int Divide/Int Subtract, whatever and it will reflect that in the GUI.

Make sure you're selecting the Global Int instead of a local int to that FSM. If it still isn't working can you post some screenshots of the FSM/Actions?
Title: Re: Changing Global Variables on different FSM's
Post by: Sjones on April 11, 2013, 11:41:56 AM
make sure the GUI FSM is being updated per frame (or per second) if its only run once it wont update the GUI again
Title: Re: Changing Global Variables on different FSM's
Post by: Kaneydien on April 11, 2013, 11:53:54 AM
Ah, I forgot to have it update once per frame. Thanks!
Im very new to playmaker, and programing for that matter lol.
Thanks everyone, this is such a great and helpful community!