Putting this under bug because maybe it is?
I’m currently stuck on thunderhooves It builds the blocking fences on the bottom correctly but for some reason on the last one, it runs up to the yak and build the fence then I die. I’m a noob but my scripting looks correct, any insight/advice?
loop
local yak = self:findNearestEnemy()
if yak then
if yakY > self.pos.y then
local yakPos = yak.pos
local yakX = yakPos.x
local yakY = yakPos.y
self:buildXY("fence", yakX , yak.pos.y - 10)
else
local yakPos = yak.pos
local yakX = yakPos.x
local yakY = yakPos.y
self:buildXY("fence", yakX, yakY + 10)
end
else
self:moveXY(self.pos.x + 10, self.pos.y)
end
end