eastern-flames/eastern flames/objects/ARTICULATOR/Step_0.gml

17 lines
490 B
Plaintext

c_input();
if select {
var mousex = floor(mouse_x/global.tilesize.x);
var mousey = floor(mouse_y/global.tilesize.y);
log(mousex, mousey);
if mousex < array_length(global.map) {
if mousey < array_length(global.map[mousex]) {
var i;
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
if global.map[mousex][mousey].contents[i].object_index == o_unit {
log("selected a guy");
c_selectunit(global.map[mousex][mousey].contents[i]);
}
}
}
}
}