11 lines
326 B
Plaintext
Raw Normal View History

2022-08-18 13:47:07 -07:00
function c_inheritunit(x, y, unit_, alignment) {
2022-08-14 19:35:57 -07:00
var chump = instance_create(-10, -10, o_unit);
chump.data = unit_;
chump.pos.x = x;
chump.pos.y = y;
2022-08-15 19:04:23 -07:00
chump.sprite_index = unit_.idle;
2022-08-14 21:06:41 -07:00
array_push(global.map[x][y].contents, chump);
2022-08-18 13:47:07 -07:00
array_push(global.units[alignment], chump);
chump.alignment = alignment;
2022-08-14 19:35:57 -07:00
return chump;
}