Scopes

Homer

New Member
Reaction score
2
I've never used them before and I have a question. How would i trigger a scope to run from outside the scope(via another function or trigger).

JASS:
function testing takes nothing returns nothing
//call start scope test
endfunction

scope test initializer start
private function start takes nothing returns nothing
//what do i put here exactly?
endfunction
endscope


Hopefully I'm getting what I want to say across. Thanks in advance.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Easier would be to use a library if you want it called from multiple triggers since these will move your code to the map header. Other than that all you need to do is call the function by its name, which can be done by any function that is not private.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
You can just leave it as it is, or you can make it public. For example:
JASS:

library Stuff

function Test takes nothing returns nothing
endfunction

public function Test2 takes nothing returns nothing
endfunction
endlibrary


The function "Test" would be called using "call Test()", while the function "Test2" would be called using "call Stuff_Test2()" (unless it's called within the library, then you can call it using only the function name).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top