move you self

This commit is contained in:
the me 2022-08-16 15:28:01 -07:00
parent 9cdac2b47e
commit 4d394955fa
18 changed files with 127 additions and 22 deletions

View file

@ -0,0 +1,6 @@
function c_moveunit(targetunit, destination) {
array_remove(c_gettile(targetunit.pos.x, targetunit.pos.y).contents, targetunit);
array_push(destination.contents, targetunit);
targetunit.pos.x = destination.x;
targetunit.pos.y = destination.y;
}

View file

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