Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Ishmell on August 31, 2014, 03:19:15 PM

Title: Store float from script
Post by: Ishmell 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.
Title: Re: Store float from script
Post by: IEP 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
Title: Re: Store float from script
Post by: Ishmell 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.