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

Help with Local Arrays in triggers

Status
Not open for further replies.
Level 1
Joined
Dec 17, 2004
Messages
4
Hello all

I've got a little problem; I don't know how to define local arrays in editor. I use Custom Script: "local unit udg_L_Unit" to define a non-array variable, but I don't know how to define an array. Also, Custom Script: "local unit array udg_L_Unit" won't work. When I try to launch the game with my map, it won't load nor start loading.


Help would be appreciated. :)
 
Level 1
Joined
Dec 17, 2004
Messages
4
The function doesn't happen at map initialization and if I write Custom Script: "local unit array L_Unit" instead of "local unit array udg_L_Unit" it works.. It's really weird. I'll try to experiment with it more.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
I personally haven't tried it before but you can do the following thing:

Have the whole trigger done.
Copy-paste it so you can have a backup.
Convert the original trigger to Custom Text (JASS)
At the beginning of the main function add a local unit array (Variable name).
Put anywhere you used the array the name of the variable instead of udg_Group or whatever is the name of the Array after the udg_ . This practically uses slight JASS...
 
Status
Not open for further replies.
Top