playMaker

Author Topic: Store float from script  (Read 1630 times)

Ishmell

  • Playmaker Newbie
  • *
  • Posts: 2
Store float from script
« on: August 31, 2014, 03:19:15 PM »
Hi,
I've tried to research a solution to this but I cant seem to find one. I believe what I'm trying to accomplish should be fairly simple.

I'm trying to use a playmaker action to grab a public float from a .cs script and store it in a playmaker public float which I can use in my playmaker FSM's. The float value I'm attempting to retrieve from the script is the Health of the player so it constantly changes.

If someone can point me in the right direction I will be extremely grateful.

IEP

  • Playmaker Newbie
  • *
  • Posts: 9
  • Computer Arts
Re: Store float from script
« Reply #1 on: September 01, 2014, 09:49:35 AM »
Hi;
Use "GETPROPERTY" Action And Then drop your script into it; To setting the float as your FSM's Float.

Thanks;
Esi

Ishmell

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Store float from script
« Reply #2 on: September 01, 2014, 01:13:04 PM »
I knew about Get Property I just didn't realize I can attach a game object component itself into the target property which is fantastic. It provides so much more development potential. Thank you!

My only issue now is every time I attach my health script component in the target and click to expand Property it freezes Unity but seems to work with all my other components.
« Last Edit: September 01, 2014, 01:15:36 PM by Ishmell »