Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
call OtherTriggerfunction(variable1, variable2, variable3, ...)
function Trig_Example_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local real x = GetLocationX(l)
local real y = GetLocationY(l)
// Some actions
endfunction
//===========================================================================
function InitTrig_Example takes nothing returns nothing
set gg_trg_Example = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Example, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Example, function Trig_Example_Actions )
endfunction
you can let the other function be called via parameters but this works only if you call it from your declaring trigger but where is a problem with globals ? u do this via the takes arguments in a function
I posted an example of this multiple times already, so please try to search for it (although it's mostly seen in Jass, but I DID go and make a GUI example, so you might want to search that post).
Set Casters[Total] = Caster
Set Targets[Total] = Target
Set Total = Total + 1
Set Casters[Integer A] = Casters[Total - 1]
Set Targets[Integer A] = Targets[Total - 1]
Set Total = Total - 1
Sadly I can't find my original post...
But wouldn't it be kind of slow if 40 units need to know what position they have in the same array at the same time?
Thanks for the great reply
