Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Murcho on October 11, 2011, 07:21:52 PM

Title: Access Global Variables via Script. [SOLVED]
Post by: Murcho on October 11, 2011, 07:21:52 PM
Is there an easy way to access Global Variables through the scripting interface?  I've setup scripts before to access Variables located in specific FSMs, but haven't been able to work out how to access the Glopal Variables.
Title: Re: Access Global Variables via Script.
Post by: Alex Chouls on October 12, 2011, 01:27:26 AM
Use: FsmVariables.GlobalVariables to get the global FsmVariables.

For example:

var globalVariables = FsmVariables.GlobalVariables;
var numLives = globalVariables.GetFsmInt("numLives");

Away from my computer, so haven't tested, but that should work...
Title: Re: Access Global Variables via Script.
Post by: Alex Chouls on November 05, 2011, 02:50:11 PM
Did this work for you?