• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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