playMaker

Author Topic: I am stuck...running variables / GetScript action  (Read 3314 times)

forcevfx

  • Playmaker Newbie
  • *
  • Posts: 20
I am stuck...running variables / GetScript action
« on: June 13, 2011, 10:34:31 AM »
I am trying to incorporate playmaker into some existing code, I wrote a script to send some vars to FSM...

I can see the values changing at runtime, in the editor...I'm like great, I can store these values, every frame
in an upper level fsm, have that run every frame, and all other sub fsm's can get the values from that.

So I am trying to figure out why this simple concept is not working..
Is this the Global Variables issue??
ie.
I have a healthcontroller.cs running, I added a custom script, to get that value in playmaker.
I see the value, I see it changing when hit. when I assign a new playmaker health float to that value, that new float will never change on every frame, while the GetHealth action health is showing realtime values...like I have to call that script on every state, which I would rather not do.

am I missing something, I have to keep all that in code, but still puzzling..

another question, does displaying all those states, switching, have a major performance issue, while running editor, running your game, and other apps?

MaDDoX

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 165
    • FluidPlay Studios
Re: I am stuck...running variables / GetScript action
« Reply #1 on: June 14, 2011, 12:33:59 AM »
I see the value, I see it changing when hit. when I assign a new playmaker health float to that value, that new float will never change on every frame
Your question is a bit confusing. Do you want to have a top FSM variable to be "seen" by other FSMs? That's not possible currently, you have to set event data, send event to FSM, etc. Now, if you want to see the FSM variables changing/updating in real time, do NOT look at the variables section. Performance, bug or whatever, it doesn't work, I've already reported that to Alex. Either toggle on the variable "inspector" box (and observs its values through the inspector, ofc) or enable the actions "debug" option and watch the variable value changing right in there.

Quote
another question, does displaying all those states, switching, have a major performance issue, while running editor, running your game, and other apps?
It does, but next version will have extensive customization for toggling those off during play time. After your game is compiled/export none of this matters btw, performance is always maxed out.
--
Breno "MaDDoX" Azevedo
@brenoazevedo