Quote: "AGK doesn't offer arrays in types,"
I'd say AGK's Tier 1. Tier 2 ofcourse does.
Like that (C++):
#define gold 1
#define bronze_sword 2
#define diamonds 3
class mappart
{
public:
int treasure;
int quantity;
public:
mappart();
~mappart();
};
mappart::mappart()
{
treasure = new int[100]; //Even 100 items in a chest :)
quantity = new int[100]; //Same as above.
// (Actually 101, because 0 is also one.)
for(int n = 0; n < 101; n++)
{
treasure[n] = -1; //-1 = no treasure, "void". In every piece of box. Aka. No treasure at all.
quantity[n] = -1;
}
}
mappart::~mappart()
{
//Clean everything up, so there are no memory leaks.
delete [] treasure;
delete [] quantity;
}
Then just put this somewhere:
mappart map[5][6]; //5 rows(Y) & 6 columns(X)
//Then, expecting that x and y is known,
map[x][y].treasure[0] = gold;
map[x][y].quantity[0] = 4576; //The player's gonna be rich after he find that out.
//And another treasure,
map[x+1][y].treasure[1] = bronze_sword; //So he won't get robbed.
map[x+1][y].quantity[1] = 1; //No need to give him the whole armoury.
This reminds me why I prefer C++