eastern-flames/eastern flames/scripts/c_moveunit/c_moveunit.gml

9 lines
330 B
Plaintext
Raw Normal View History

2022-08-16 22:28:01 +00:00
function c_moveunit(targetunit, destination) {
2022-08-22 17:10:15 +00:00
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
2022-08-23 06:49:38 +00:00
log(theguy.contents);
2022-08-23 08:34:45 +00:00
/*if !*/array_remove(theguy.contents, targetunit) //idhfnjg();
2022-08-16 22:28:01 +00:00
array_push(destination.contents, targetunit);
targetunit.pos.x = destination.x;
targetunit.pos.y = destination.y;
2022-08-22 17:10:15 +00:00
theguy.event();
2022-08-16 22:28:01 +00:00
}