• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Help with Local Arrays in triggers

Status
Not open for further replies.

SlaveMaster

S

SlaveMaster

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. :)
 
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...
 
Status
Not open for further replies.
Back
Top