playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Playmaker 1.9.1 Released!
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
[solved] passing variables from custom script to fsm
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [solved] passing variables from custom script to fsm (Read 16276 times)
xeondream
Playmaker Newbie
Posts: 2
[solved] passing variables from custom script to fsm
«
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?
«
Last Edit: June 15, 2012, 06:04:23 AM by xeondream
»
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: passing variables from custom script to fsm
«
Reply #1 on:
June 15, 2012, 05:26:15 AM »
Hi,
There is a script example showing how to achieve this:
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
Logged
xeondream
Playmaker Newbie
Posts: 2
Re: passing variables from custom script to fsm
«
Reply #2 on:
June 15, 2012, 06:03:49 AM »
thanks jean. it works ^^.
Logged
lalamax3d
Playmaker Newbie
Posts: 12
Re: [solved] passing variables from custom script to fsm
«
Reply #3 on:
August 10, 2013, 04:14:58 AM »
thanks
it helped..
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
[solved] passing variables from custom script to fsm