Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: aLDime on September 01, 2013, 09:13:51 AM
-
Hi everybody!
Need send float variable from FSM to public float not Playmaker C# script.. How?
-
What no one knows how to do it?
Even developers PM? I will prompt you, I need a complete function:
GameObject.GetComponent.<ScriptName>().variable;
but not it's which are curtailed to Play Mayker!
-
Developers PM you don't know the truth?:
http://hutonggames.com/playmakerforum/index.php?topic=3490.msg16071#msg16071
Then the answer to one question: In actually think that Unity users can solve all their problems with the Play Maker? Well, if you do not have a working dosih "connector" with a third party scripts?
-
Everything, himself asked himself replied, as usual:))
Here is a working script - "connector" with your script:
using UnityEngine;
using System.Collections;
using HutongGames.PlayMaker;
public class ShipSpeedToMotionBlur : MonoBehaviour
{
public PlayMakerFSM behavior;
public string fsmFloat;
public float MultSpeed;
void Update ()
{
MultSpeed = behavior.FsmVariables.GetFsmFloat(fsmFloat).Value; // Get float variable from FSM
GetComponent<MotionBlur>().blurAmount = MultSpeed; // Send float variable from FSM to my script
}
}
Thank you all, and all are free))
PS: Support - not bad to make a similar custom action!
-
Hi,
Sorry, Unite was on, and I am only about to catch up with 10 pages of pending threads :)
but I am glad you found a solution for your problem and that are sharing it back ( even if replying to yourself always is a weird experience :) ). It's indeed a very common pattern.
In your case tho, you could get away with the action "Set Property". Have you tried that?
Bye,
Jean