08.01.2017, 20:53
Hi, I've read that it's possible to use enum as a variable, is it possible then to create an array of this variable within another enum?
Here's what I'd like to achieve:
Here's what I'd like to achieve:
PHP код:
enum MUSCLE_ENUM
{
bool:IS_TENSED;
STRENGTH,
FLEXIBILITY,
ENDURANCE
}
enum BODY
{
bool:IS_MOVING,
bool:IS_SLEEPING,
MUSCLE_ENUM:MUSCLE[3000] //that's the key line
}
new organism_data[BODY];
TenseAllTheMuscles()
{
new i;
for(i=0;i<3000;i++)
{
organism_data[MUSCLE][i][IS_TENSED] = true; //that's the exact line I'd like to use
//or something like:
organism_data[MUSCLE[i]][IS_TENSED] = true;
}
}