c_input(); var mouse = c_2dto3d(mouse_x,mouse_y); if select && selectedunit == noone { 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) && mousex >= 0 { if mousey < array_length(global.map[mousex]) && mousey >= 0 { var i; for (i=0; i global.gw-100 { var guyhits = floor(abs(mouse.y-global.gh-10)/32); log(guyhits, array_length(selectedunit.inventory)); if guyhits < array_length(selectedunit.inventory) { //log("doing"); selectedunit.equippedweapon = guyhits+1; c_equipweapon(selectedunit, selectedunit.inventory[selectedunit.equippedweapon]); } //draw_text(global.gw-10, global.gh-10-i*20; } } var mousex = floor(mouse.x/global.tilesize.x); var mousey = floor(mouse.y/global.tilesize.y); //log(mousex, mousey); hoveredunit = selectedunit; if mousex < array_length(global.map) && mousex >= 0 { if mousey < array_length(global.map[mousex]) && mousey >= 0 { var i; for (i=0; i