range marking

This commit is contained in:
the me 2022-08-18 13:47:07 -07:00
parent d8e6a82fdb
commit 26eabf966d
58 changed files with 774 additions and 76 deletions

View file

@ -1,14 +1,13 @@
c_addunit(un.chara, ARMY.US);
c_addunit(un.kris, ARMY.THEM);
//c_addunit(un.chara, ARMY.US);
//c_addunit(un.kris, ARMY.THEM);
var i;
/*for (i=0; i<array_length(global.units[ARMY.US]); i++) {
c_inheritunit(2+i, 2, un.chara);
}*/
var chara = c_inheritunit(8, 5, un.chara);
c_addweapon(chara, wp.knife, true);
c_addweapon(chara, wp[$"iron sword"]);
var kris = c_inheritunit(10, 5, un.kris);
c_addweapon(kris, wp[$"iron sword"], true);
c_loadstageone();
selectedunit = noone;
hoveredunit = noone;
hspd = 0;
@ -33,4 +32,5 @@ function setCam(){
camera_set_proj_mat(cam,getProj());
camera_set_view_mat(cam,getView())
camera_apply(cam);
}
}
global.turn = ARMY.US;

View file

@ -9,8 +9,12 @@ if select && selectedunit == noone {
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]);
var dude = global.map[mousex][mousey].contents[i];
if dude.alignment == global.turn {
c_selectunit(dude);
} else {
c_markunit(dude);
}
}
}
}
@ -56,3 +60,9 @@ if mousex < array_length(global.map) && mousex >= 0 {
}
}
}
var i;
for (i=0; i<array_length(global.units[global.turn]); i++) {
if global.units[global.turn][i].waiting = false exit;
}
global.turn = (global.turn+1)%2;

View file

@ -12,6 +12,8 @@ inventory = [];
c_addweapon(id, wp.nothing);
equippedweapon = noone;
waiting = false;
targeting = new vec2(0, 0);
marked = false;
continuecombat = function(me, them) {
//if stamina returnable = true stamina-- return true