playMaker

Author Topic: [SOLVED] Horizontal scaling health bar NGUI  (Read 4063 times)

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
[SOLVED] Horizontal scaling health bar NGUI
« on: February 23, 2013, 07:30:27 PM »
Hey all,

Found a ton of information on making health bars with code but as I'm not coder myself I was wondering if there is a tutorial for playmaker.

So far I have a simple GUI text that shows how much health there is 0 - 100 this is working but not sure how to go from that to a GUI bar.

I am using NGUI and have loaded a progress bar into the scene.

Looking forward to your responses.

WB
« Last Edit: February 25, 2013, 05:20:06 AM by will_brett »

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Horizontal scaling health bar NGUI
« Reply #1 on: February 24, 2013, 09:13:30 AM »
I have tried this example http://hutonggames.com/playmakerforum/index.php?action=dlattach;topic=1362.0;attach=1296;image

but this doesn't seem to work with NGUI. It just scales the NGUI progress bar to 0.4 each time I remove health. Or is it that I have missed something out?

Thanks

W

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Horizontal scaling health bar NGUI
« Reply #2 on: February 24, 2013, 09:42:46 AM »
Ok so I have got the Health bar scaling better now with the use of "Set Float Value" in the setup state. However My menu bar always starts at scale 150 even though it is 200 in the scene view, there is no mention of 150 anywhere in any of my FSMs. How do I change the start scale? I want to start at 50%.

Iv attached some screen shots of my FSM. This may spread across two posts

 


will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Horizontal scaling health bar NGUI
« Reply #3 on: February 24, 2013, 09:43:33 AM »
and the other images...
« Last Edit: February 24, 2013, 06:38:40 PM by will_brett »

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: [SOLVED] Horizontal scaling health bar NGUI
« Reply #4 on: February 25, 2013, 05:20:59 AM »
Ok this was quite obvious. All my actions were aimed at the foreground when in fact they should have been aimed at the Slider Script. It works fine now.