something like enemy ai

This commit is contained in:
the me 2022-08-18 18:47:44 -07:00
parent f52e476acf
commit 0b371ac22d
8 changed files with 102 additions and 38 deletions

View file

@ -1,3 +1,21 @@
while global.turn == ARMY.THEM {
var done = true;
for (k=0; k<array_length(global.units[ARMY.THEM]); k++) {
var target = global.units[ARMY.THEM][k];
if !target.waiting {
done = false;
} else {
continue;
}
c_doenemyai(target);
}
if done {
c_dewait(global.turn);
global.turn = (global.turn+1)%2;
}
}
c_input();
var mouse = c_2dto3d(mouse_x,mouse_y);
if select && selectedunit == noone {