playMaker

Author Topic: Int variable decaying over time  (Read 1155 times)

hawttu

  • Playmaker Newbie
  • *
  • Posts: 3
Int variable decaying over time
« on: May 08, 2020, 01:38:09 PM »
I have a health int variable that should decay over time. I currently have an FSM with two states, one has add int action and the other one has a wait action. Is this okay or is there a better way to do this?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Int variable decaying over time
« Reply #1 on: May 09, 2020, 05:17:29 AM »
Hi.
it depends on how you want it to look and how you visualize the health.

if using a slided you might want to use a float instead and you could use a float add (and set 'per second') to make it look more smooth.

but again it totally depends on your game style