playMaker

Author Topic: How do I call a global playmaker variable from C# [SOLVED]  (Read 2112 times)

Bome99

  • Playmaker Newbie
  • *
  • Posts: 3
How do I call a global playmaker variable from C# [SOLVED]
« on: October 06, 2014, 10:36:30 AM »
I need to get a Vector3 from a Fsm and use it in C#, how do I do that?

Cheers
« Last Edit: November 29, 2014, 06:20:38 PM by Alex Chouls »

Bome99

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do I call a global playmaker variable from C#.
« Reply #1 on: October 06, 2014, 11:52:57 AM »


ok got it "send message" :)

But can I do it every frame?

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 715
    • Flashing Lights
Re: How do I call a global playmaker variable from C#.
« Reply #2 on: October 06, 2014, 12:28:24 PM »
Try to loop with Next Frame Event,

I dont know if this counts as "Every frame", but maybe this helps :)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: How do I call a global playmaker variable from C#.
« Reply #3 on: October 06, 2014, 08:14:04 PM »
Take a look at this page for accessing PlayMakerFSMs from C# scripts:
https://hutonggames.fogbugz.com/default.asp?W329

To get a global variable use:
FsmVariables.GlobalVariables.GetFsmFloat etc.


Bome99

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do I call a global playmaker variable from C#.
« Reply #4 on: October 07, 2014, 04:01:51 AM »
Than you both! :)