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

9 lines
330 B
Plaintext

function c_moveunit(targetunit, destination) {
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
log(theguy.contents);
/*if !*/array_remove(theguy.contents, targetunit) //idhfnjg();
array_push(destination.contents, targetunit);
targetunit.pos.x = destination.x;
targetunit.pos.y = destination.y;
theguy.event();
}