Go
Wc3C.net
»
Warcraft III Modding
»
Developer's Corner
»
Triggers & Scripts
»
2d arrays
2d arrays
01-29-2004, 11:30 AM
#1
marshall
Is there any way to make or fake 2d arrays?
It's a nightmare having to have 8 1d arrays and 8 triggers when I should only need one of each.
01-29-2004, 01:25 PM
#2
Vexorian
Didn't you read the announcement? , The Trigger and Utility
Repository
is to store useful triggers, NOT QUESTIONS, use the map development forum for questions, thread moved.
01-29-2004, 02:00 PM
#3
Oinkerwinkle
To simulate a A(width) by B(length) array, just make an array A*B long and access the values like wantedY*A+wantedX.
Code:
0 (0*3+0) 1 (0*3+1) 2 (0*3+2) 3 (1*3+0) 4 (1*3+1) 5 (1*3+2)
01-29-2004, 04:10 PM
#4
marshall
Thanks muchly. :D
As for posting in the wrong place, sorry, but I was in Map Development when I posted...
01-30-2004, 01:38 PM
#5
Vexorian
You were in the trigger and utility repository, Take a look at that forum and you'll see a redirect to this thread
01-31-2004, 02:00 AM
#6
LegolasArcher
Try a search for 2d arrays. I know there is atleast 1 in the JASS forum that uses the game cache (it works on bnet for this purpose).