| 06-22-2006, 02:03 AM | #1 |
I need to create a casting bar and I was wondering what the best way to do it would be. I want it to be like the one in WoW, e.g. a moving bar that is capable of changing colours over a background. I'm going to make a billboarded back, but I wanted to know the best way to make the moving bar. I've thought of three methods: Animated Texture Problems: Have to make one for each color bar. Can't change the animation stage in game Flat White Bar, make it a unit and change the scale/vertex color in game. Problems: Might be tricky placing it to work with the back drop. Moddeled Bar attached to a attachment point Problems: Huge number of animations, probably look rough with multiple animations. Needs quite a few textures. Any suggetions? |
| 06-22-2006, 03:41 AM | #2 |
I'd just use a floating text and some | or so ;o |
| 06-22-2006, 04:52 AM | #3 |
Yeah, we were discussing just that in general discussion in a GW AoS idea thread located here somewhere near the middle of the first page onwards. We decided dynamic floating texts made via triggers were the way to go. Check it out in the thread. |
| 06-22-2006, 08:06 AM | #4 |
I can't use Floating Text unless I figure out how to get rid of the limit. I tried the fadetime thing and I couldn't get it to work. Besides, I'd really like a model so it looks good. |
| 06-22-2006, 11:39 AM | #5 |
JASS:function FadingText takes player p, string msg, integer red, integer green, integer blue, real x, real y, real vel, real fade, real life returns nothing local texttag t=CreateTextTag() call SetTextTagText(t,msg,0.024) call SetTextTagPos(t,x,y, 0.00) call SetTextTagColor(t,red,green,blue,255) call SetTextTagVelocity(t,0,vel) call SetTextTagVisibility(t,(GetLocalPlayer() == p)) call SetTextTagFadepoint(t, fade) call SetTextTagLifespan(t, life) call SetTextTagPermanent(t, false) endfunction Play with those values, they work perfectly. If you work in GUI, "Custom Script - call FadingText(...)" gets the job done. In my humble opinion, Floating Text is the most efficient and best looking way to do it. It would work if you made a model for it and set it's SetUnitTimeScale(...) to 0 though, so if you can make it/find someone to make it, it would most certainly work. And if you do make it a model, make it on a stand alone unit set directly above the casting unit. That way you can do what I just suggested, SetUnitTimeScale(...) which sets their animation speed. If you set it to 0, it pauses the unit. Also, I'm fairly sure you can make the entire bar working in one stand animation, then speed/slow it with SetUnitTimeScale(...). |
| 06-22-2006, 01:16 PM | #6 |
I've done this before to make health bars in the top right corner. They look damn hot as long as the bar is a perfect rectangle (As in, not slanted on one side like Halo or something). All I did was a little workaround to let me animate verts, then dragged the two end verts from one side to the other. After that it's just a matter of changing color gradually. Anyone with 3dsMax knowledge should have no problem making this. You main problem is keeping it locked in the same place on the screen at all times (Assuming you want it like in WoW, not hovering above the unit but in a position on the screen.) It's possible, so long as you have a custom camera (As in, a constant locked camera and the pageup/down id disabled.) |
| 06-22-2006, 11:55 PM | #7 |
How did you easily change the scale/color of the bar without creating hundreds of blocky animations? Or was it only one way? To keep it in one place, I assumed the GetCameraState or whatever would work fine for me. |
| 06-23-2006, 05:43 AM | #8 |
hmm what if you would make a ONE animation, where it changes color and fills up and just manipulate animation speed |
| 06-23-2006, 07:23 AM | #9 |
Unfortunately I need to be able to jump back, incase casting is interupted by a blow or whatever. And I need about 10 different colors for each different type of cast. I definetly think I'll do it with a scalable unit, it just seems so much easer than the alternatives. |
| 06-23-2006, 11:26 AM | #10 |
Oh come on, didn't I make a big enough bang when I won the spell contest? I used negative animation speed to play a death animation backwards. You could do the exact same here like Jacek said. They won't be blocky except that they stop. So for my purposes I had 10 animations. Each represented 10% of the units HP. So yes, after a while a single section would disapear, but the change was animated - not instant. |
| 06-23-2006, 10:32 PM | #11 |
Oh. I had no idea animation speed worked in reverse. Well that makes it a lot easier, thanks. Still has the color problem though. |
| 06-23-2006, 11:50 PM | #12 |
Make it white and tint the dummy unit with triggers. |
| 06-24-2006, 01:34 AM | #13 |
If I'm doing that, whats the point of animating it at all, rather than just using scale triggers. |
| 06-24-2006, 01:40 AM | #14 |
For the obvious reason that you can't scale in only one dimention via triggers? Try a search, the SetUnitSize is bugged. |
| 06-24-2006, 07:04 AM | #15 |
Damn, thats nasty. I'll keep that in mind. Thanks Tim., pity I can't give you anymore rep. |
