playMaker

Author Topic: communicating with FsmVariables through C# scripts [SOLVED]  (Read 3254 times)

Sushi

  • Playmaker Newbie
  • *
  • Posts: 2
communicating with FsmVariables through C# scripts [SOLVED]
« on: September 30, 2011, 11:35:14 AM »
Hi I am developing a game with another person who uses PlayMaker and I am a C# programmer.

What I am having problems with is that I am trying to reference the variables within his PlayMakerFSM components and compare them to the Unity Engine variables.

ex:

if(GameObject.Find("ball") == fsmBall){
  blah blah
}

error saying I cant compare the two

Whats the best way for my C# scripts to communicate with PlayMaker?

Thanks
« Last Edit: October 12, 2011, 01:28:39 AM by alexchouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: communicating with FsmVariables through C# scripts
« Reply #1 on: October 03, 2011, 01:16:45 AM »
Hi,

 You have to use fsmBall.Value ( because fsm variables are made this way, if you want to reach the actual  data, you have to get it via the .Value)

If you open any of the playmaker actions, you'll see how this is used.

 Bye,

 Jean

Sushi

  • Playmaker Newbie
  • *
  • Posts: 2
Re: communicating with FsmVariables through C# scripts
« Reply #2 on: October 03, 2011, 02:09:45 PM »

thank you for your help jeanfabre, much appreciated