| 02-17-2004, 08:57 PM | #1 |
Im making a JASS spell, that requires texttags. This is what I have so far: Code:
local integer one = GetRandomInt(1, 3) local integer two = GetRandomInt(1, 3) local integer three = GetRandomInt(1, 3) local string combo = I2S(one) + " " + I2S(two) + " " + I2S(three) local texttag disp = CreateTextTag() call DisplayTextToPlayer(0, 0, 0, combo) call SetTextTagText(disp, combo, 0.00) call SetTextTagPosUnit(disp, GetSpellAbilityUnit(), 20.00) call SetTextTagColor(disp, 100, 80, 20, 0) call SetTextTagVisibility(disp, true) Im sort of a n00b at JASS, and I appologize. |
| 02-17-2004, 10:00 PM | #2 |
Try changing from Code:
call DisplayTextToPlayer(0, 0, 0, combo) Code:
call DisplayTextToPlayer(Player(0), 0, 0, combo) |
| 02-17-2004, 10:49 PM | #3 |
Its ironic my debug line cause that. I was going to change it to that, I must hav elost my train of thought though. The other thing it was showing a different line iwth the error on it. Well it works, thanks:D Now Im rwally puzzled (this is my first JASS spell. When I display the text I see a period, and nothing more. Heres my updated code: Code:
local integer one = GetRandomInt(1, 3)
local integer two = GetRandomInt(1, 3)
local integer three = GetRandomInt(1, 3)
local string combo = I2S(one) + " " + I2S(two) + " " + I2S(three)
local texttag disp = CreateTextTag()
local integer i = 1
local effect array Gold
local boolean won = false
call SetTextTagText(disp, combo, 0.00)
call SetTextTagPosUnit(disp, GetSpellAbilityUnit(), 20.00)
//call SetTextTagColor(disp, 100, 80, 20, 0)
call SetTextTagVisibility(disp, true)
if (one == two or two == three) then
set won = true
endif
set Gold[0] = AddSpecialEffectTargetUnitBJ("overhead", GetSpellAbilityUnit(), "Objects\\InventoryItems\\TreasureChest\\treasurechest.mdl")
loop
exitwhen i == 10
set Gold[i] = AddSpecialEffectTargetUnitBJ( "overhead", GetSpellAbilityUnit(), "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
set i = i + 1
call TriggerSleepAction(.1)
endloop
set i = 1
call TriggerSleepAction(1.5)
call DestroyEffect(Gold[0])
loop
exitwhen i == 10
call DestroyEffect(Gold[i])
set i = i + 1
endloop
call TriggerSleepAction(3)
call DestroyTextTag(disp) |
| 02-17-2004, 11:11 PM | #4 |
I have no clue how to use texttags unfortunetly, a quick test with your code didn't give me any visual output at all though. |
| 02-17-2004, 11:43 PM | #5 |
I just caught the period, its tiny, and I was lucky to see it on dark terrian. I hope someone could help me with thit, but thanks for trying. Its my first JASS texttag XP aswell. |
