This commit is contained in:
the me 2022-08-14 21:06:41 -07:00
parent 1c893940ac
commit cfcfd3e263
21 changed files with 227 additions and 7 deletions

View file

@ -0,0 +1,17 @@
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]);
}
}
}
}
}