• 🏆 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!

[Solved] Running a Lua script on map init

Status
Not open for further replies.
Level 9
Joined
Jul 30, 2018
Messages
445
Hey!

This may seems a bit simple question, yet I have not been able to find an answer for it.

With JASS, one can make an initializer to make a function run on map init. Or you can convert an empty GUI trigger to Custom Text and then check "Run on Map Initialization".

But is there such a thing for Lua? I've been trying to Google and search the answer, but apparently there aren't that much people making Lua tutorials for Warcraft 3. It just seems a bit silly to make a bunch of Lua functions and then call them all in a GUI trigger... :p
 
Level 9
Joined
Jul 30, 2018
Messages
445
Yeah! That's just it. Thank you!

I remember seeing that onGlobalInit() function being used on some systems and maps, but it didn't work for me and I never realized it was just created separately elsewhere.
 
Status
Not open for further replies.
Top