playMaker

Author Topic: Frame event on both state  (Read 1555 times)

Macgomes

  • Guest
Frame event on both state
« on: May 23, 2019, 03:02:30 AM »
Post Removed by djaydino.

This was a duplicate post made by an adbot.

usually we remove their posts and threads, but answers here might be useful for someone.
« Last Edit: July 31, 2019, 05:19:45 PM by djaydino »

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Frame event on both state
« Reply #1 on: May 23, 2019, 03:07:51 AM »
No, it's not. Make it update as less as possible as long as the result is visibly the same. I usually use wait and set time to 0.1, it's basically the same for the human eye and a lot less taxing on the cpu.
Available for Playmaker work

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Frame event on both state
« Reply #2 on: May 23, 2019, 02:26:55 PM »
Hello everyone,,
I am making a health bar following the tutorial in the link.  I made two "next frame event" on both states.  When the game start, I see there a loop which constantly updating the number.  Everything works.

My question is that is it good practice to put two next frame event on both sides? It kind of look like infinite loop because I see light flashing on both side when the game running...

When player takes damage, have it send an event. The UI FSM gets the event and updates. No constant frame checking required. Don’t worry too much at the beginning, make it work. But using some good practice can’t hurt ;)