Hey there, looking to create a multi tile, enemy character and was wondering if any one had any tips or best practices.
current build is based off of squid gods tutorials, but looking to expand on this.
on enemyMoveUpdate do
newEnemyX = event.x
newEnemyY = event.y
if event.pxnewEnemyX then
newEnemyX++
end
tileAtNewPos = name newEnemyX,newEnemyY
if tileAtNewPos!="white2" then
newEnemyX = event.x
end
if event.py<newEnemyY then
newEnemyY--
elseif event.py>newEnemyY then
newEnemyY++
end
tileAtNewPos = name newEnemyX,newEnemyY
if tileAtNewPos!="white2" then
newEnemyY = event.y
end
swap "white2"
tell newEnemyX,newEnemyY to
swap "enemy"
end
if newEnemyX==event.px then
if newEnemyY==event.py then
damage = 1
tell event.player to
call "damagePlayer"
end
end
end
end