playMaker

Author Topic: Changing Global Variables on different FSM's(solved)  (Read 2431 times)

Kaneydien

  • Playmaker Newbie
  • *
  • Posts: 15
Changing Global Variables on different FSM's(solved)
« 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.
« Last Edit: April 11, 2013, 11:54:08 AM by Kaneydien »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Changing Global Variables on different FSM's
« Reply #1 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?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Changing Global Variables on different FSM's
« Reply #2 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

Kaneydien

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Changing Global Variables on different FSM's
« Reply #3 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!