Game cache would never be slower than a giant loop and an array, and gamecache is not that slow anyways.
Multi-Array
not ratedIt is a system of variable multi-array. Compatible all var type with only one type in all array of multi-array. Functions presented is for var integer or string, but it is very easy to change the type of the variable (ex:unit).
A array parent of array can also contain values.
In order to read in a array it is necessary to open it.
**Functions description**
function CreateArray takes nothing returns nothing
Create a array in the array in course
function SelArray takes integer IdArray returns boolean
Open the array indexed < IdArray > of the array in course
If the array does not exist then return over ' False', if not return' True'
function SelPArray take integer NbParent returns boolean
Open array relative of the array in course
Execute the action above < NbParent >.
Return' False' if the array does not have a relative (i.e. array 0)
function ReadArray takes integer ValId returns integer
Return the indexed value < ValId > of the array in course
If the index does not exist then return ' - 1 '
function CountVArray takes integer IdGArray return integer
Return the number of values indexed in array < IdGArray >.
Caution it acts of the general index, not of the index of the array in course
If the index indicated does not exist then return ' - 1 '
function CountArray takes integer IdGArray return integer
Return the number of arrays indexed in array < IdGArray >.
Caution it acts of the general index, not of the index of the Array in course
If the index indicated does not exist then return ' - 1 '
function GetArray takes nothing return integer
Retourne the general index of the array in course
function AddArray takes integer valley returns nothing
Add < valley > to the array in course
function ValArray takes integer ValId, integer valley returns nothing
Allot < valley > to the index < ValId > of the array in course
If the index then does not exist there to create this in their allotting value -1.
** Maps Example **
Integer: Debug Map
http://metalplanet.org/forums/attachment.php?attachmentid=2191
String: Treeview
http://metalplanet.org/forums/attachment.php?attachmentid=2192
** Installation **
To create the following variables of the integer type:
Name: array: Default:
va_ArrayVal True
va_PosArray True
va_ArrayParent True -1
va_pos False -1
va_NbArray False
va_ArraySel False
Then to copy the following lines in code personalized script
A array parent of array can also contain values.
In order to read in a array it is necessary to open it.
**Functions description**
function CreateArray takes nothing returns nothing
Create a array in the array in course
function SelArray takes integer IdArray returns boolean
Open the array indexed < IdArray > of the array in course
If the array does not exist then return over ' False', if not return' True'
function SelPArray take integer NbParent returns boolean
Open array relative of the array in course
Execute the action above < NbParent >.
Return' False' if the array does not have a relative (i.e. array 0)
function ReadArray takes integer ValId returns integer
Return the indexed value < ValId > of the array in course
If the index does not exist then return ' - 1 '
function CountVArray takes integer IdGArray return integer
Return the number of values indexed in array < IdGArray >.
Caution it acts of the general index, not of the index of the array in course
If the index indicated does not exist then return ' - 1 '
function CountArray takes integer IdGArray return integer
Return the number of arrays indexed in array < IdGArray >.
Caution it acts of the general index, not of the index of the Array in course
If the index indicated does not exist then return ' - 1 '
function GetArray takes nothing return integer
Retourne the general index of the array in course
function AddArray takes integer valley returns nothing
Add < valley > to the array in course
function ValArray takes integer ValId, integer valley returns nothing
Allot < valley > to the index < ValId > of the array in course
If the index then does not exist there to create this in their allotting value -1.
** Maps Example **
Integer: Debug Map
http://metalplanet.org/forums/attachment.php?attachmentid=2191
String: Treeview
http://metalplanet.org/forums/attachment.php?attachmentid=2192
** Installation **
To create the following variables of the integer type:
Name: array: Default:
va_ArrayVal True
va_PosArray True
va_ArrayParent True -1
va_pos False -1
va_NbArray False
va_ArraySel False
Then to copy the following lines in code personalized script