Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: playmakertester on September 23, 2020, 06:42:29 AM

Title: How to make the Float add process go more smoothly
Post by: playmakertester on September 23, 2020, 06:42:29 AM
Hi,

I want to increase a variable from 1 to 2 to 3..., but I don't want to increase it by one in one State, but I want to increase it in a finer way, such as from 1 to 1.1 to 1.2..., so that when it reaches 2 at the end, it changes to the next State. (sighs)

If you have any good actions to take, please let me know.
Title: Re: How to make the Float add process go more smoothly
Post by: curb47 on September 23, 2020, 08:16:40 AM
A Float variable does exactly that, 1.0000, 1.0001, 1.0002 etc

An Integer variable counts in whole number, 1,2,3 etc

Look at Float Interpolate, or Float Ease. I can't remember if they're on the Ecosystem or part of vanilla Playmaker.
Title: Re: How to make the Float add process go more smoothly
Post by: djaydino on September 23, 2020, 08:48:02 AM
Hi.
You can do a 'Float Add' and set per second, to display you can use float to string and set format to 0,0

Then you can also have a float compare to check if 2 is reached.
Title: Re: How to make the Float add process go more smoothly
Post by: playmakertester on September 23, 2020, 11:43:32 AM
Hi curb47, djaydino

Thanks for detail. Let me try.
Title: Re: How to make the Float add process go more smoothly
Post by: playmakertester on September 23, 2020, 11:49:34 AM
to display you can use float to string and set format to 0,0

Hi djaydino,

Would it be possible for you to tell us what the purpose of this explanation is?

Best,
Title: Re: How to make the Float add process go more smoothly
Post by: djaydino on September 23, 2020, 12:02:02 PM
Hi.
my bad, The format should be 0.0 btw not 0,0


If you want to show the value in UI and you want only to show 1.1 you can use the format 0.0

if you want for example 1.11 then set format 0.00
if you want for example 01.11 then set format 00.00
if you set no format it will show the complete float (1.235662345)