playMaker

Author Topic: Can you carry a VARIABLE over between scenes[solved]  (Read 3021 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Can you carry a VARIABLE over between scenes[solved]
« on: January 24, 2015, 04:17:32 PM »
Using javascript I can make a variable to go over scenes for high score and such.  The global variables in playmaker are for THAT scene only.  They do not go  over scenes (as far as I know).  In playmaker I can carry over ITEMS in the hierarchy between scenes by not destroying them.

What I would like to do is carry over a variable to all scenes so I can set the volume level of the music and not have it change as a new scene is entered.  Ii assume this is possible but not sure how.
« Last Edit: January 25, 2015, 01:33:39 AM by wheretheidivides »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Can you carry a VARIABLE over between scenes
« Reply #1 on: January 24, 2015, 06:10:19 PM »
In playmaker they are called Global variables - Playmaker/Editor Windows/Global Variables

strange_aeons

  • Junior Playmaker
  • **
  • Posts: 62
Re: Can you carry a VARIABLE over between scenes
« Reply #2 on: January 24, 2015, 06:13:40 PM »
yes, i believe that the Global Variables are present in all scenes made within a project and so the value of each variable should be carried over between scenes also

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Can you carry a VARIABLE over between scenes
« Reply #3 on: January 25, 2015, 01:31:22 AM »
I thought global variables in playmaker are only global for a scene so that a FSM can communicated to others

My bad.  Would make sense.