[JASS] Map Initialization?

Status
Not open for further replies.
Level 10
Joined
May 28, 2011
Messages
455
im converting trigger with event - map initialization into jass

but...

map initialization event doesnt exist in jass. @@"

and of course it does not run unless i execute the trigger (using gui with map initialization event).

is it only applicable in gui?

any idea?
 
If you declare a scope or a library you can declare an initializer, which is called at map initialization.

JASS:
scope ScopeName initializer init
    private function init takes nothing returns nothing
        // This function is executed at map initialization.
    endfunction
endscope

This also lets you declare many functions with the name init because they are private within the scope/library (in this case ScopeName). There is a manual I believe in the JNGP download that has more detail on specifying things as private and public. It pretty much means what it says.
 
Status
Not open for further replies.
Back
Top