btw, can you "open a hole" at method update for change texttag overtime ????
That feature does not belong in this resource. If you want that, code another resource that supports changing texttags over time that uses this one or start your own timers.
I only supported what are supported by current texttags and a tiny bit more (the set texttag target position should lock to that position).
Quote:
When i used .setVelocity() and .angle= , i recognized that the angle you made is Radian not Degree.
At least, add a comment about it or add *bj_DEGTORAD when calculating because "angle" makes everybody to think about degree
radians are what the rest of the world uses by default.
function Trig_Untitled_Trigger_001_Actions takesnothingreturnsnothing local TextTag tt set tt= TextTag.createLocal(GetLocalPlayer()==Player(0)) call tt.setPosition(GetRectCenterX(bj_mapInitialPlayableArea),GetRectCenterY(bj_mapInitialPlayableArea),70) call tt.setText("ABC",12) call tt.setVelocity(80.,90.) set tt.lifespan=3.0 set tt.fadepoint=1.1 endfunction
function InitTrig_Untitled_Trigger_001 takesnothingreturnsnothing set gg_trg_Untitled_Trigger_001 =CreateTrigger() callTriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001,0.5) callTriggerAddAction( gg_trg_Untitled_Trigger_001,function Trig_Untitled_Trigger_001_Actions ) endfunction
Last edited by vuongkkk; 04-04-2012 at 03:52 AM.
Reason: Only report the bug
When creating texttags overtime like "Example - error case" with this system
I saw:
- First: have a texttag disappears when the time comes !!!
- Second: some texttags disappear when they do not expire !? (i used fadepoint to confirm that)
- Third: texttags disappear like a disease
You should run my test code to see what is the bug.....
I think the bug relates with timer!
sure allocate() method is magical but still remain a prob here!
the code doesn't works properly if all cons are true:
- The number of texttag breaks the limit
- Use the standard texttag like crit, miss, bounty and GUI texttag...
If you reach limit, the oldest non-permanent texttag is taken.
Not sure what you mean on point 2. I've run into 0 probs with this when running hundreds of texttags. Yes, they will end early, but that's to be expected.
Nes, if you're up for it, you can help users get past the 100-texttag limit by seeing if certain texttags can be merged ;)
All texttags having the same X or Y (non-moving) can be merged.
If two texttags have the same X or Y and and are moving, they can only be merged if they have the same velocity :P
- Use the standard texttag like crit, miss, bounty and GUI texttag...
I've already tried it in the past, texttags created by triggers and the ones created by the game don't seem to share the same stack.
The test is easy, display 100 texttags by trigger, and then display game's ones.
__________________
- There are bugs with wc3, but most of time, the bug is between the keyboard and the chair.
- Never believe some warcraft "fact" without a proof, even from an "experienced" user, that's how myths & legends born.
You spam "...", "lol", and smilies such as "; p", "^)^",">.>"? You think you're the best and all other ones are stupids or at least less clever than you ? You think your errors are funny, while the other ones are incredibly lame ?
Maybe you've too much ego,or worse, you're a douchebag
You could probably take advantage of something like that :P
For example, if you want damage texttags, you could give units 100% critical strike and set the multiplier to 1, then modify the color data and shit in that MiscXX.txt file inside Warcraft III's MPQ files <:
EDIT : Anyway, do you realize that we can't really control them, at least not in the same way that the ones created by triggers (lifespan, position, velocity, etc) ?
__________________
- There are bugs with wc3, but most of time, the bug is between the keyboard and the chair.
- Never believe some warcraft "fact" without a proof, even from an "experienced" user, that's how myths & legends born.
You spam "...", "lol", and smilies such as "; p", "^)^",">.>"? You think you're the best and all other ones are stupids or at least less clever than you ? You think your errors are funny, while the other ones are incredibly lame ?
Maybe you've too much ego,or worse, you're a douchebag
Creating local texttags is hard to deal.
I think it's not a prob unless:
have a unit learn Critical Strike and that unit have speed enough to create more than 100 - <localRemaining> texttags
Btw, I used a part of your code in my texttag system, hope that not violate the copyright...