• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
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.
Top