G
GrayDwarf
Guest
Is it possible to add object instances to an array or perhaps some other way to store a list of instances? I see that I can store enums and other primitive types. I'm working on a block of code that is supposed to return a list of surrounding tiles when given a tile. I was expecting to do something like this:
Code:
/// GetListOfSurroundingTiles(obj_Tile)
tile = argument[0];
var listOfSurroundingTiles;
var i = 0;
with(obj_Tile)
{
if (self.id == tile.id)
{
continue;
}
if (...)
{
if (...)
{
listOfSurroundingTiles[i++] = self
}
}
}
return listOfSurroundingTiles;