Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: xeondream on June 15, 2012, 04:55:34 AM
-
hi all, i got a custom script with say this string variable "abc". how do i pass it to playmaker fsm so that i can set my string from custom script to my global variable string in my fsm?
-
Hi,
There is a script example showing how to achieve this:
http://hutonggames.com/playmakerforum/index.php?topic=1733.msg7631#msg7631 (http://hutonggames.com/playmakerforum/index.php?topic=1733.msg7631#msg7631)
Basically you need to
1: be using HutongGames.PlayMaker
2: create a public variable of type FsmComponent (let's call it "myFsm", where you can then drag a fsm component on it
3: access its variables like so:
myFsm.FsmVariables.GetFsmString("my string variable").Value = "hello"
or string myString = myFsm.FsmVariables.GetFsmString("my string variable").Value ;
Bye,
Jean
-
thanks jean. it works ^^.
-
thanks
it helped..