PlayMaker Help & Tips > PlayMaker Help

GetFsmFloat value set variable

(1/1)

maconbot:
I am trying to set a FsmFloat the same way I set a Fsm String and it won't let me says:
The best overloaded method match for `HutongGames.PlayMaker.Fsm.Event(string)' has some invalid arguments

I have tried many combinations, ultimately this seemed the closest:
FsmFloat f1 = character.FsmVariables.GetFsmFloat("delay").Value;
FsmFloat f2 = character.FsmVariables.GetFsmFloat("zero").Value;
f1.Value = f2.Value

...it does nothing.  Thank you for your time.

jeanfabre:
Hi,

 your error is in how to treat the FsmFloat to set it:


--- Code: ---FsmFloat f1 =
--- End code ---

you need to do it this way:


--- Code: ---FsmFloat f1 = character.FsmVariables.GetFsmFloat("delay");
FsmFloat f2 = character.FsmVariables.GetFsmFloat("zero");
f1.Value = f2.Value

--- End code ---

bye,

 Jean

Navigation

[0] Message Index

Go to full version