Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Papadie on October 01, 2019, 05:42:12 AM
-
Hello developers,
I need some help with Playmaker (I'm an artist).
I am trying to change a number gradually (from 0 to 1), as the slider is moving towards 0, from 100.
I already tried some things and got stuck 😅 Couldn't find anything anywhere.
The idea is to make an effect gradually appear as the health is dropping.
Thanks a lot!
-
Hi,
for this, your best option is to use the FloatRemap on the ecosystem
you'll map 0-1 to 100-0 and done :)
(https://i.imgur.com/0hRpy1U.gif)
Bye,
Jeanb
-
Hi.
you need to use "Ui Slider Get Value" to get the value, and then have a float Operator and divide by 100 and store in a variable.
(or float remap instead of Float Operator that jean mentioned)
Now because this is a custom script you can not use a standard action.
Drag and Drop the component (Bleed Behavior) and select 'Set Property' and look for the corresponding property field.
you can also place the 'Set Property' action and drag the component in it.
But do not over use Get/Set Property actions, only if you have no other choice. (like 3rd party scripts)
You can always look on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) for many custom actions
Also if you use Get/Set Property actions you might need Linker Wizard (http://hutonggames.com/playmakerforum/index.php?topic=11126.0) on certain platforms.
-
Thanks a lot guys! :)