playMaker

Author Topic: Making a Power Meter!  (Read 556 times)

helpplzisuck

  • Playmaker Newbie
  • *
  • Posts: 1
Making a Power Meter!
« on: January 19, 2021, 10:53:10 PM »
Hello All!
I am very new (2 weeks with Unity, 3 days with Playmaker) and I'm just trying this out for fun!
I am making a Power Meter!

When you click a button rapidly, the meter starts quickly filling up!
When you stop clicking it slowly falls...
When you charge it up enough, it triggers a new action!

I thought I had it figured out with this:



There is a Controller Move on State 2 and State 3.
State 2 has the object rise up quickly and state 3 has it falling down slowly.
The problem is, it never resets back to state 1 so the object just keeps falling!
I want to keep clicking on it, so that the object rises until it hits a collider, which will trigger an animation!

It might be crazy enough to work!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Making a Power Meter!
« Reply #1 on: January 23, 2021, 02:44:57 PM »
Hi.
Make a separate fsm and use a float subtract (set per second on) and a float clamp
set float clamp to 0 and the maximum value you wish.
the subtract value will be deducted per second.

Then on the button fsm use a "Fsm Float Add" (Ecosystem)

and target 1st fsm to add there.