zz_y7.jump_dupe = function(mob)
local ai = mob.MobAIComponent
local kb = mob.MobKnockbackComponent
local rb = mob.MobRigidbodyComponent
if (not isvalid(rb)) then
if (isvalid(ai)) then
-- ai:EnableNextControlTimer(0.1)
end
return
end
if (not mob.Visible) then
-- ai:EnableNextControlTimer(0.1)
return
end
local fh = rb.LastFoothold
if (fh == 0) then
--log("last foothold is 0")
-- ai:EnableNextControlTimer(0.1)
return
end
local now = _UtilLogic.ServerElapsedSeconds
-- if (now < ai.NextActionTime) then
-- -- ai:EnableNextControlTimer(math.max(ai.NextActionTime - now, 0) + 0.1)
-- return
-- end
local target = _UserService.LocalPlayer
local nextAction = 0
local newInputX = nil
local mobX = mob.TransformComponent.WorldPosition.x
if (isvalid(target) and ai.LocalUnchaseTick < 7) then
if (ai.AttackWasLast) then
nextAction = _GlobalRand32:RandomIntegerRange(100, 110) / 1000
ai.AttackWasLast = false
else
nextAction = _GlobalRand32:RandomIntegerRange(100, 110) / 1000
end
local targetX = target.TransformComponent.WorldPosition.x
if math.abs(targetX - mobX) > 6 then
if targetX > mobX then
-- newInputX = 3
newInputX = 2
else
-- newInputX = -3
newInputX = -2
end
else
newInputX = math.max(targetX - mobX + 1.2, -2)
end
else
nextAction = (_GlobalRand32:RandomIntegerRange(200, 210) / 1000)
newInputX = _UserService.LocalPlayer.TransformComponent.WorldPosition.x - mobX + 1.2
end
local platforms = mob.CurrentMap.PlatformInfoComponent
local timelines = {}
local timelineIndex = 0
--log("platform left x (fh=%d)", platform.left.x, platform.left.foothold.Id)
--log("platform right x (fh=%d)", platform.right.x, platform.right.foothold.Id)
local lastTimeline = 0
-- local playerFh = _UserService.LocalPlayer.WsUserController.LastFoothold
-- if (playerFh == 0 or platforms.ZMass[playerFh] ~= ai.LocalStartChaseZMass) then
-- ai.LocalUnchaseTick += 1
-- ai:IncUnTick()
-- end
local function makeCommand(cmd, value, timeline, nextActionTime)
timelines[timelineIndex + 1] = {cmd, value, timeline - lastTimeline, nextActionTime}
timelineIndex += 1
lastTimeline = timeline
end
local targetX = _UserService.LocalPlayer.TransformComponent.WorldPosition.x
local targetY = _UserService.LocalPlayer.TransformComponent.WorldPosition.y
local mobY = mob.TransformComponent.WorldPosition.y
local gapX = math.abs(mobX - targetX)
local gapY = math.abs(mobY - targetY)
if gapX > 3 then
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
makeCommand(_MobActionPartType.Jump, 1, 0)
elseif gapY > 1.5 then
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
makeCommand(_MobActionPartType.Jump, -1, 0)
elseif gapX < 1.3 and targetX < mobX then
makeCommand(_MobActionPartType.Move, 0, 0, nextAction)
else
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
end
kb:SetShoeAttr(0)
if (timelineIndex > 0) then
mob.CurrentMap.LifeControllerComponent:RequestControl(mob, timelines, timelineIndex, false)
endend
여기안에 뭔갈 바꿔야 하는거같은데 맞죠? ㅜㅠ
전사도 x좌표 수정가능해서 좀 덜붙게할수있으면 덜맞고 사냥되나요? 아니면 그냥 맞으면서 어쩔 수 없이 해야하나요.. 적자가 넘 심해요..
여기서 어떤 좌표숫자를 건드려야할까요..?
할줄아는거 없고 맨날 공유된거 쓰는 줍줍이인데,, 리셀은 절대 안하고 혼자 사용하고있습니다..!!
혹시라도 지나가시다가 도움주실 수 있으신분은 도움주시면 감사하겠습니다!
cp충전도 해놓아서 1:1채팅도 걸 수 있습니다.!
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 공지 | 게시판 이용 안내+156 | 10-20 | 22115 | |
| 61669 | 12:22 | 34 | ||
| 61668 | 12:03 | 52 | ||
| 61667 | 11-11 | 167 | ||
| 61666 | 11-11 | 186 | ||
| 61665 | 11-11 | 195 | ||
| 61664 | 11-11 | 317 | ||
| 61663 | 11-11 | 247 | ||
| 61662 | 11-11 | 375 | ||
| 61661 | 11-10 | 318 | ||
| 61660 | 11-10 | 335 | ||
| 61659 | 11-10 | 328 | ||
| 61658 | 11-10 | 366 | ||
| 61657 | 11-10 | 484 | ||
| 61656 | 11-10 | 472 | ||
| 61655 | 11-09 | 532 | ||
| 61654 | 11-09 | 496 | ||
| 61653 | 11-09 | 528 | ||
| 61652 | 11-09 | 583 | ||
| 61651 | 11-09 | 529 |
댓글7
if gapX > 3 then
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
makeCommand(_MobActionPartType.Jump, 1, 0)
elseif gapY > 1.5 then
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
makeCommand(_MobActionPartType.Jump, -1, 0)
elseif gapX < 1.3 and targetX < mobX then
makeCommand(_MobActionPartType.Move, 0, 0, nextAction)
else
makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
end
이거수정인가요?!
elseif gapX < 1.8 and gapX > 1.4 and targetX < mobX then
난 법산데
newInputX = math.max(targetX - mobX + 1.8, -2)
newInputX = _UserService.LocalPlayer.TransformComponent.WorldPosition.x - mobX + 1.8
elseif gapX < 1.8 and gapX > 1.4 and targetX < mobX then
이렇게 3개 바꿈
감사해요 형님 이따 저도 해봐야겠아요!
수정안하는거보단 낫죠?
안하는거보단 확실히 나음
< > 이거왜 인식못하냐
elseif gapX < 1.8 and gapX > 1.4 and targetX < mobX then
이건 내캐릭 옆에 몹이 일정거리 앞에서 딱 멈추게 할라고 수정햇는데 그래도 와리가리 치긴하더라 ㅠㅠ