turnstates

This commit is contained in:
the me 2022-08-19 10:19:08 -07:00
parent 1a13781220
commit cd85677efd
57 changed files with 1813 additions and 104 deletions

View file

@ -0,0 +1,19 @@
function st_enemyturn() {
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);
state = st_control;
global.turn = (global.turn+1)%2;
}
}
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "Scripts",
"path": "folders/Scripts.yy",
},
"resourceVersion": "1.0",
"name": "st_enemyturn",
"tags": [],
"resourceType": "GMScript",
}