• 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.

Automatically importing triggers?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

Is there a script/command I can put in a map which takes a(n) (absolute) path as an argument to search for a Trigger file (.wtg), which it then imports directly into the map?

It would run this command every time I load the map.
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
I dont think this is supported by this way(when map is loading), but you can do

//! import "filepath", which will import the script when you save the map

This will import a trigger file? Will it not overwrite the entire triggers already in the map?

Edit: Also, where does the script go afterward?
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
it will place the contents of .j I believe where the import line is, but they are imported before pretty much anything else happens. It imports .j, so is only useful for jass/vJass stuff.

What you want to do is otherwise impossible to do
 
Status
Not open for further replies.
Top