• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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