Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on September 09, 2019, 09:53:54 PM
-
Hello !
(https://i.imgur.com/nV80fWJ.png)
Someone let me know that how to execute this Math formula in playmaker. Look at red box. (1.07)10
What is that 10 means ? Multiply by 10 or what?
Sorry, I'm weak on Maths.
Thanks
-
This is called exponentiation. The normal written value (1.07) is called base, the raised value (10) is the exponent, or power. It means:
X = 1.07 × 1.07 × 1.07 × 1.07 × 1.07 × 1.07 × 1.07 × 1.07 × 1.07 × 1.07
That means, the base is multiplied as many times with itself as indicated in the raised value (power).
Never needed it, but here’s the function:
https://docs.unity3d.com/ScriptReference/Mathf.Pow.html
There should be an action, if not, I can probably make one.
-
Hi !
I found this
https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/master/Assets/PlayMaker%20Custom%20Actions/Math/FloatOperatorAdvanced.cs
When I imported the script. it gave these errors
Assets\PlayMaker Custom Actions\Math\FloatOperatorAdvanced.cs(10,39): error CS0246: The type or namespace name 'FsmStateActionAdvanced' could not be found (are you missing a using directive or an assembly reference?)
Assets\PlayMaker Custom Actions\Math\FloatOperatorAdvanced.cs(40,24): error CS0115: 'FloatOperatorAdvanced.Reset()': no suitable method found to override
Assets\PlayMaker Custom Actions\Math\FloatOperatorAdvanced.cs(51,24): error CS0115: 'FloatOperatorAdvanced.OnActionUpdate()': no suitable method found to override
How to fix this ?
-
Hi.
You should have the FsmStateActionAdvanced.cs file.
But i can't seem to find it on the Ecosystem.
Try the one that i attached below
-
Hi.
I just noticed that there are 2 versions of that action.
if you are on unity 5 or higher you should get the unity 5 version, this one does not need the FsmStateActionAdvanced.cs anymore.
-
Hi !
FloatOperatorAdvanced.cs fr Unity 5 is empty now :P
I use Unity 2018 and that gave error.
Errors gone after imported FsmStateActionAdvanced packge.
It is working.
Btw Result is like this 7.868609. How can I make it to 7.78 ?
Thanks
-
Hi.
If to display you can use convert float to string and set formant 0.00
I also noticed a action on the Ecosystem called 'Float Decimal Count'
Maybe that could be useful for you as well