playMaker

Author Topic: Click button faster -> Attack faster (with a cap)  (Read 1045 times)

cloudjsh7

  • Playmaker Newbie
  • *
  • Posts: 5
Click button faster -> Attack faster (with a cap)
« on: April 08, 2018, 07:09:45 PM »
Greetings great hivemind,

I have in mind for an ability for one of my characters in where the faster you click the attack button, the speed of the character's basic attack increases but stops increasing at maybe +50%

I'm imagining I'd use a scaling method in an FSM that increases the speed of the attack Animation via 'Set Animation Speed' every time the character attacks and then using a variable that "stores" the increases and then stops when it has increased after 5 times (assuming we increase by 10% for a total increase of 50%) every time.

Anyone have any thoughts or better methods?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Click button faster -> Attack faster (with a cap)
« Reply #1 on: April 09, 2018, 03:50:04 AM »
Hi.
I did something similar for a multiplier on a clicker game

In short i used 3 fsms.
One to add a value for each click on my variable (counter)
One to deduct per second on the variable(counter)
and one fsm to set the multiplier using float compares
i also used a float compare on the 'add value' fsm to check if the 'counter' variable was not greater than 60, if greater don't add value.