HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Array Sizes?

08-17-2007, 11:26 PM#1
Taur
I was wondering if setting the size of your array to a definite number would help efficiency, obviously not every array is going to have 8192 values.

Most tutorials I read (or so I recall) said that array sizes dont really matter, but in most programming languages you declare the size of the array so I'm not really sure.
08-17-2007, 11:32 PM#2
Rising_Dusk
In WC3, the "array size" in the trigger editor is how many array indicies the game will initialize. If you create a group array of size 5, only the first 5 indicies will be set to a "CreateGroup()" though ALL indicies can still be used.

So yes, to answer your question all WC3 arrays have 8192 usable indexes still. It doesn't change efficiency at all, unless you for some reason initialize all 8190ish indicies to a never-to-be-used handle or something silly.
08-17-2007, 11:36 PM#3
Toadcop
you CAN'T set it's size its blizzards fake they just fill array slot with needed values... + there are 8191 slots.