playMaker

Author Topic: Accessing PlayMaker from Scripts - Expanded Guide?  (Read 2363 times)

SteveB

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
Accessing PlayMaker from Scripts - Expanded Guide?
« on: September 04, 2013, 12:33:46 PM »
This page...

...seems like it could use some minor enhancement.

Primarily what are all the methods we can use to access variables in an FSM? I see

GetFSMInt
GetFSMFloat
GetFSMString
GetFSMBool


...but what else? Gameobjects/Colliders/etc? I just want to make sure I get the syntax correct.

All in all that page should be far far more thorough in listing the methods and means to do this, else I'm currently guessing that, for example, my wanting to send collider info is 'GetFSMCollider'...but I'm not certain.

I'm having a wonderful time integrating PlayMaker into a larger portion of my project so I just want to see it be as robust as I know it is. :)

Thank you!


-Steve

SteveB

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
Re: Accessing PlayMaker from Scripts - Expanded Guide?
« Reply #1 on: September 04, 2013, 12:37:49 PM »
BTW I did find this link which I suspect is essentially what I'm asking for.

Perhaps the two should be associated with eachother? :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15212
  • Official Playmaker Support
    • View Profile
Re: Accessing PlayMaker from Scripts - Expanded Guide?
« Reply #2 on: September 11, 2013, 12:52:37 AM »
Hi,

 Is it not a case of using "GetFsmVariable" and "GetFsmVariables"?

bye,

 Jean

SteveB

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
Re: Accessing PlayMaker from Scripts - Expanded Guide?
« Reply #3 on: September 11, 2013, 08:38:01 AM »
It is, and not exactly what I was asking for. :D

I wanted to know the exact methods and parameters for getting the various types of variables, which I noted a link to in my second post right after the initial one.

I think the page that I have issue with could be a made a bit more robust and complete by combining the two pages for those less savvy trying to locate the info they need.

Consider a big part of the PlayMaker community is coming from the art side who want to be able to design and program easily without having to learn a great deal of coding. As such, any instruction, tutorial and action descriptions should be written with the audience in mind, not from a programmers mind. Fortunately I was able to suss out what I needed, but I also know how to do a healthy bit of coding on my own, but I'm still more the artist/animator/designer than I am a programmer, so I understand what I would personally need from good documentation.

Thanks Jean!!

-Steve

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15212
  • Official Playmaker Support
    • View Profile
Re: Accessing PlayMaker from Scripts - Expanded Guide?
« Reply #4 on: September 13, 2013, 12:22:30 AM »
Hi,

 Yes, it's indeed something important to consider.

 I am not too sure where you stand on your understanding of this second link you gave: https://hutonggames.fogbugz.com/default.asp?W1103

Could you explain what's missing in your opinion, now that you understood how to access the various available types?

Bye,

 Jean

SteveB

  • Playmaker Newbie
  • *
  • Posts: 29
    • View Profile
Re: Accessing PlayMaker from Scripts - Expanded Guide?
« Reply #5 on: September 13, 2013, 08:24:38 AM »
Well by finding that page, I know what variables I'm able to pull. Again I was able to figure it out myself but I shouldn't have had to hunt it down, and rather it should be on that initial page discussing all this.

The page in question isn't set up like your 'Core Concepts' page, which takes the time to explain everything. Again, a programmer might get it immediately, and you could argue it's an advanced topic, but I've had to communicate between PM and my own scripts often enough for it to not be a trivial addition to my toolset. I feel that page should have as much care taken as the rest of the documentation.

I could be making this a bigger issue than it is, but my gut feeling was that at first glance I had to try harder to understand and find the information I needed than the actual difficulty level of the task itself. I'm a huge proponent of instructions that spend more time explaining stuff; it's your tool and you want users to get the most out of it, so why gloss over it? Never assume the audience is going to 'get it' the way you may understand it. We've already have to deal with terrible or nonexistent Unity documentation, so a little extra time making it as simple as possible will go a long way to consumer appreciation.

Combine the two pages, make 'Accessing PlayMakerFSM in Scripts' a primary link in the sidebar or at least in Editing Basics instead of tossing it into API. Highlight each method and give an explanation and a nicely formatted example. Then list all the methods for each type, or at the very least link to the appropriate API page. As a quick example, I understand that .Value; is the value of the variable I asked for, and that .Value = x; is modifying it, but it's not immediately clear for someone looking at that code for the first time, and it wasn't for me.

Well again it's not important to do any of this perhaps, as I was able to figure it out, so if not for me maybe the next guy? :D

Thanks Jean
« Last Edit: September 13, 2013, 08:26:35 AM by SteveB »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15212
  • Official Playmaker Support
    • View Profile
Re: Accessing PlayMaker from Scripts - Expanded Guide?
« Reply #6 on: September 15, 2013, 11:01:53 PM »
Hi,

Thanks. Indeed making a proper section for PlayMaker integration and communication with scripts has always been something "pending" in a way. So your input is definitly valuable. It needs to be addressed for sure. It's pretty intense time currently to get betas out and stabilize several aspect of Playmaker, I guess the next move will be to settle on features and concentrate on documentation. There are some great plans on this already written down, so definitly coming.

bye,

 Jean