playMaker

Author Topic: Increase float while slider is moving towards 0[SOLVED]  (Read 1622 times)

Papadie

  • Playmaker Newbie
  • *
  • Posts: 2
Increase float while slider is moving towards 0[SOLVED]
« 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!
« Last Edit: October 01, 2019, 09:00:07 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Increase float while slider is moving towards 0
« Reply #1 on: October 01, 2019, 08:59:58 AM »
Hi,

 for this, your best option is to use the FloatRemap on the ecosystem

you'll map 0-1 to 100-0 and done :)



Bye,

 Jeanb

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Increase float while slider is moving towards 0[SOLVED]
« Reply #2 on: October 01, 2019, 09:01:44 AM »
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 for many custom actions

Also if you use Get/Set Property actions you might need Linker Wizard on certain platforms.
« Last Edit: October 01, 2019, 09:03:28 AM by djaydino »

Papadie

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Increase float while slider is moving towards 0[SOLVED]
« Reply #3 on: October 01, 2019, 09:06:34 AM »
Thanks a lot guys! :)