| 09-19-2004, 04:49 PM | #1 |
Code:
function t_actions takes unit whichUnit returns nothing
call SetTextTagPosUnit(GetLastCreatedTextTag(), whichUnit, 0)
endfunction
function tagdebug takes unit whichUnit returns nothing
local trigger t = CreateTrigger()
call CreateTextTagLocBJ("hi", GetUnitLoc(whichUnit), 0, 10, 0, 0, 0, 0)
call TriggerRegisterTimerEventPeriodic(t, 1)
call TriggerAddAction(t, function t_actions(whichUnit))
endfunctionbut my question is about call TriggerAddAction(t, function t_actions(whichUnit)) for the second function (t_actions) to function it requires which unit to move the texttag to. but, it doesnt like me passing parameters into the actions. is there a way to do this without using globals? edit: oh yeah, and if this whole thing is a total waste of time, still tell me how the parameter thing works for future knowledge |
| 09-19-2004, 05:20 PM | #2 |
I believe u need a global or gamecache. but u can use a blizzard.j global and then set it back to what it was, if you like (for better portability). |
