Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: wheretheidivides on February 15, 2016, 09:19:56 AM
-
I know this has probably been asked before but I can't find a answer. I am writing a game that uses some c#, javascript and playmaker. I want the variables to be in playmaker, so was wondering if you could change a playmaker global variable from c#.
The other option is just to make all variables in c# script and access then from playmaker. I can do this as well, but am trying to move more towards playmaker for everything.
-
Make it global?
-
but how???
-
There is an API Reference here (https://hutonggames.fogbugz.com/default.asp?W127). Examples are also provided here (https://hutonggames.fogbugz.com/default.asp?W329).
There is a lot of useful information on the Wiki.
-
Thanks
-
although solved,
you must add(include) :
using HutongGames.Playmaker;
and use this code:
FsmVariables.GlobalVariables.GetFsmString("nameoftheglobalfsmstring").Value = yourvalue;
you should use GetFsmString for strings GetFsmInt for ints and so on...