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.
Test the map with the trigger not in map init, and also, sometimes the editor doesn't let you do triggers because they are faulty, and will fail to load the map.
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.
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...