Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on September 23, 2019, 02:02:36 AM

Title: How to solve this math problem ? (Idle Game)
Post by: heavygunner on September 23, 2019, 02:02:36 AM
Hello !

I am not good at math. Help me to solve this equation in Playmaker. This is for a Idle Game. I attached excel file too.
I have no idea about what is floor , logr .

(https://i.gyazo.com/248183376ff81107b253767b5e3ddbf3.png)

Thanks
Title: Re: How to solve this math problem ? (Idle Game)
Post by: heavygunner on September 25, 2019, 01:12:58 PM
Anyone ?  :'(
Title: Re: How to solve this math problem ? (Idle Game)
Post by: Thore on September 25, 2019, 03:08:37 PM
Hi, where do you get the formulas from?  :)

When you encounter functions like floor, you can look them up in a coding context, and if that doesn’t yield results search as “mathf floor” (mathf (https://docs.unity3d.com/ScriptReference/Mathf.html) houses math functions for floats in C#).

In the list you’ll find both floor (rounding down) and log (logarithm). To use them in unity, you’ll use code like:

Code: [Select]
Mathf.<function>(<parameters>)

When Visual Studio is set up correctly, as it should with a recent Unity version properly installed, it should already suggest options when typing the dot after Mathf. You can then plug your formula into an action (using the Custom Action Wizard as a start, and looking at simpler example actions, e.g. Mathf.Abs).
Title: Re: How to solve this math problem ? (Idle Game)
Post by: miguelfanclub on September 25, 2019, 03:37:16 PM
Normally, floor returns the largest integer less than or equal to a given number.

https://docs.unity3d.com/ScriptReference/Mathf.Floor.html
Title: Re: How to solve this math problem ? (Idle Game)
Post by: heavygunner on September 25, 2019, 06:09:20 PM
Hi !
Thanks. I try.
I found all spreadsheets from here https://blog.kongregate.com/the-math-of-idle-games-part-i/