playMaker

Author Topic: How to Execute this math formula in playMaker ?  (Read 2369 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
How to Execute this math formula in playMaker ?
« on: September 09, 2019, 09:53:54 PM »
Hello !



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

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: How to Execute this math formula in playMaker ?
« Reply #1 on: September 09, 2019, 10:11:07 PM »
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.
« Last Edit: September 09, 2019, 10:22:56 PM by Thore »

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: How to Execute this math formula in playMaker ?
« Reply #2 on: September 09, 2019, 11:27:43 PM »
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

Code: [Select]
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 ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to Execute this math formula in playMaker ?
« Reply #3 on: September 10, 2019, 12:58:46 AM »
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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to Execute this math formula in playMaker ?
« Reply #4 on: September 10, 2019, 01:03:11 AM »
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.

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: How to Execute this math formula in playMaker ?
« Reply #5 on: September 10, 2019, 09:35:31 AM »
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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to Execute this math formula in playMaker ?
« Reply #6 on: September 11, 2019, 08:14:22 AM »
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