| 04-10-2006, 10:25 PM | #1 |
Well, seems like it would be easy to just make some floating text..but it's not working. At all. I'm just trying to make a function CombatText which shows a string I want at target location. I'll use it for things like 'Block', 'Parry', etc, and once I get it to appear I'll modify it so it looks better. However, right now it simply doesn't show up. After running tests the string is right and the location is right, so it's a problem with the floating text. Here it is: JASS:function CombatText takes location l,string s returns texttag local texttag c = CreateTextTag() call SetTextTagText(c,s,12) call SetTextTagPos(c,GetLocationX(l),GetLocationY(l),100) call SetTextTagColor(c,100,100,0,0) call SetTextTagAge(c,1) call SetTextTagFadepoint(c,0.5) call SetTextTagVelocity(c,50,50) call SetTextTagLifespan(c,1) call SetTextTagVisibility(c,TRUE) return(c) endfunction This is incredibly annoying, it seems like I've tried everything, and it's a simple task..but it doesn't work =\. Thanks for any help. Edit: Oh and btw I've tried commenting out the Age, Fadepoint, Velocity, and Lifespan parts just to see if it worked at all. No luck. |
| 04-10-2006, 10:39 PM | #2 |
Try doing JASS:local texttag c call CreateTextTag() set texttag c = GetLastCreatedTextTag() Not too familiar with floating texts, so I dun exactly know if it's "GetLastCreatedTextTag()" |
| 04-10-2006, 10:58 PM | #3 |
Youre setting alpha to zero: call SetTextTagColor(c,100,100,0,0) The colors also need to be converted from % format to 255, like this: call SetTextTagColor(c,255,255,0,255) |
| 04-10-2006, 11:07 PM | #4 |
Haha, i do not think he feels better now when he knows its such an misstake he did....too bad i had the same problem long ago so some empathi i have |
| 04-10-2006, 11:26 PM | #5 |
Argh ok. I was just basing it off the GUI functions, and when I converted those it would show up as 100% being 100, and transparency of 0% being 0 (but those were bj functions). Thanks. |
| 04-11-2006, 12:05 AM | #6 | |
Quote:
|
| 04-11-2006, 12:38 AM | #7 |
Meh..still doesn't show up at all. Tried your idea Mystic (although why that would do anything rather than slow it down I dunno =P), that didn't change anything either. Any other ideas? |
| 04-15-2006, 09:05 AM | #8 |
Why don't you leave it in GUI? I never had a problem with it,.. |
| 04-23-2006, 08:12 AM | #9 |
GUI sucks! It's slow and .. bah! Put GUI to the graveyard! Forever! |
| 04-23-2006, 08:22 AM | #10 |
Ok, I think I know what your main problem is (with a couple of others). Firstly: JASS:call SetTextTagText(c,s,12) 12 is a huge size for a texttag. To give a comparison, the text for normal 'miss' and critical hit messages is 0.025. I think that may be the reason it's not showing up (if you fixed the alpha problem). To convert from the GUI 'size' to the correct size, multiply it by 0.0023 (gives 0.0276 in your case). The alpha problem has already been pointed out, so I'll assume it's been fixed. The last thing is, it would appear you want the text to fade out (like 'miss' etc does). It won't do that unless you add: JASS:call SetTextTagPermanent(c,false) |
| 04-23-2006, 04:15 PM | #11 |
Oh, yea it's the font size that's doing it. I ended up just making it in GUI then converting to custom text and using that. The BJ functions make me cry though, so this is good. Thanks. |
