playMaker

Author Topic: Progress bar [SOLVED]  (Read 2790 times)

eirsik

  • Playmaker Newbie
  • *
  • Posts: 22
Progress bar [SOLVED]
« on: January 25, 2014, 10:40:57 PM »
Hello everyone.

I'm new to Playmaker but have gotten a good hang of it and have created really awesome scripts using it..

Anyhow, I have a FSM that allows the player to create a campfire if all materials have been gathered and it is all working pretty great. And when the player creates the campfire I use the Wait function to create the feel of actually creating the campfire instead of having it there instantly. But I want to have a progress bar the fills up so the player can track the time left on the building.

How to make a progress bar that sync with the Wait function?

Let's say the Wait timer is set to 5sec, then I want a progress bar the uses 5sec to fill up.

And the same thing on other events as well. The player can gather some stones which takes 3sec. Then the progress bar should fill up in 3sec.


Thanks for taking time to read and aid a newb in dire need!  ;D
« Last Edit: January 26, 2014, 02:28:41 PM by eirsik »

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Progress bar
« Reply #1 on: January 26, 2014, 11:48:10 AM »
This should be of help:
http://hutonggames.com/playmakerforum/index.php?topic=5760

phannDOTde kindly put together a working object, which I then modified accorgingly. Worked perfectly, and should meet your needs. (once you plug in your time variables)

eirsik

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Progress bar
« Reply #2 on: January 26, 2014, 02:28:23 PM »
Wow thanks a bunch! Worked perfectly! And such simple solution!