Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: will_brett on February 23, 2013, 07:30:27 PM

Title: [SOLVED] Horizontal scaling health bar NGUI
Post by: will_brett 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
Title: Re: Horizontal scaling health bar NGUI
Post by: will_brett 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
Title: Re: Horizontal scaling health bar NGUI
Post by: will_brett 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

 

Title: Re: Horizontal scaling health bar NGUI
Post by: will_brett on February 24, 2013, 09:43:33 AM
and the other images...
Title: Re: [SOLVED] Horizontal scaling health bar NGUI
Post by: will_brett 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.