| 03-15-2007, 09:34 PM | #1 |
Hey, i have to make a texttag exactly the same as the one you see when you kill a unit and you get the reward, im prety new to texttags this is what i have so far: JASS:function KillReward unit uDead, integer iReward, force fDisplay returns nothing local texttag tt local location loc = GetUnitLoc(uDead) set tt = CreateTextTagLocBJ("+" + I2S(iReward), loc), GetUnitFlyHeight(uDead), 10.00, 99.61, 82.75, 7.06, 0.00) call ShowTextTagForceBJ(false, tt, fDisplay) call SetTextTagVelocityBJ(tt, 55.00, 90.00) call SetTextTagFadepoint(tt, 2.00) call SetTextTagLifespan(tt, 3.00) call SetTextTagPermanent(tt, false) call RemoveLocation(loc) set loc = null //call DestroyTextTag(tt) //set tt = null endfunction Am i doing something wrong? are the colors ok and the height? what about the text size do i have to somehow modify it? and about the cleaning of leaks, if i destroy the texttag without using waits (take out the comments marks) does it still work? Thanks a lot! |
| 03-16-2007, 01:07 AM | #2 |
Looks fine to me...and you need to uncomment those lines, else it leaks. Why don't you just test it and see what works and what doesn't? Don't ask if something works if you haven't even tried it yourself... |
| 03-16-2007, 01:17 AM | #3 |
well i had to finish the interface, but now that i did, it dont work, its not showing anything and im sure im giving it the right force, i even tryed with all players, is not showing anything ![]() |
| 03-16-2007, 01:28 AM | #4 |
Woah, now that I look at it again, you totally messed up on syntax. WorldEditor probably disabled the trigger, which is why it's not working. Try this: JASS:function KillReward takes unit uDead, integer iReward, force fDisplay returns nothing local texttag tt local location loc = GetUnitLoc(uDead) set tt = CreateTextTagLocBJ("+" + I2S(iReward), loc, GetUnitFlyHeight(uDead), 10.00, 99.61, 82.75, 7.06, 100.00) call ShowTextTagForceBJ(true, tt, fDisplay) call SetTextTagVelocityBJ(tt, 55.00, 90.00) call SetTextTagFadepoint(tt, 2.00) call SetTextTagLifespan(tt, 3.00) call SetTextTagPermanent(tt, false) call RemoveLocation(loc) set loc = null set tt = null endfunction |
