무적썬콜if math.abs(targetX - mobX) > 6 then if targetX > mobX then -- newInputX = 3 newInputX = 2 else -- newInputX = -3 newInputX = -2 end2024.02.06 21:08
무적썬콜if gapX > 3 then makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction) makeCommand(_MobActionPartType.Jump, 0.7, 0) elseif gapY > 1.8 then makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction) makeCommand(_MobActionPartType.Jump, -0.7, 0) elseif gapX < 1.5 and targetX < mobX then makeCommand(_MobActionPartType.Move, 0, 0, nextAction) 이거엿나2024.02.06 21:08
댓글3
if math.abs(targetX - mobX) > 6 then
if targetX > mobX then
-- newInputX = 3
newInputX = 2
else
-- newInputX = -3
newInputX = -2
end
감사합니다 덕분에 수정해서 잘쓰고있습니다
if gapX > 3 then
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
makeCommand(_MobActionPartType.Jump, 0.7, 0)
elseif gapY > 1.8 then
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
makeCommand(_MobActionPartType.Jump, -0.7, 0)
elseif gapX < 1.5 and targetX < mobX then
makeCommand(_MobActionPartType.Move, 0, 0, nextAction)
이거엿나