Local in another function?

Exide

I am amazingly focused right now!
Reaction score
448
Yes, by using a global variable.
Or using vJASS I believe you can do it - but I don't know how.

EDIT: There's usually a way to bypass it, though. (For example when using unit groups.)
-Show us your trigger and we might be able to help.
 

Tom Jones

N/A
Reaction score
437
1) Arrays.
2) Structs.
3) Depending on how you use the function, you could give it parameters. This solution wont work with callback functions.
4) Calls are executed within the thread, so you can access event responses in all functions, not just the thread function:

JASS:
function DisplayName takes nothing returns nothing
     call BJDebugMsg(GetUnitName(GetTriggerUnit()))
endfunction

function Actions takes nothing returns nothing
     call DisplayName()
endfunction

function ...
     local trigger trig = CreateTrigger()
     
     call TriggerRegisterAnyUnitEventBJ(trig,EVENT_PLAYER_UNIT_DEATH)
     call TriggerAddAction(trig,function Actions)
endfunction
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top