eastern-flames/eastern flames/scripts/c_inheritunit/c_inheritunit.gml

11 lines
326 B
Plaintext
Raw Permalink Normal View History

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