eastern-flames/eastern flames/scripts/unit/unit.gml

39 lines
667 B
Plaintext

//global.units = 5;
global.units = [[],[],[]];
enum ARMY {
US,
THEM,
GREEN,
}
//exit;
function unit(personaldata_, classdata_, stats_) constructor {
name = personaldata_.name;
idle = personaldata_.idle;
up = personaldata_.up;
down = personaldata_.down;
aitype = personaldata_.aitype;
alignment = noone;
var i;
for (i=0; i<array_length(stats_); i++) {
self[$stats_[i].name] = stats_[i];
}
global.unitdata[$name] = self;
}
function archetypedata() constructor {
//PERSONALDATA AND CLASSDATA ARE THE SAME THINGS
}
function c_addunit(unit, alignment) {
//log(5);
//log(global.units);
}
//c_addunit(un.chara, ARMY.US);
#macro un global.unitdata