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(200, 900) / 1000
else
nextAction = _GlobalRand32:RandomIntegerRange(100, 160) / 1000
end
local targetX = target.TransformComponent.WorldPosition.x + 0.5
newInputX = targetX > mobX and 1 or -1
else
nextAction = (_GlobalRand32:RandomIntegerRange(100, 300) / 1000)
newInputX = _GlobalRand32:RandomIntegerRange(-1, 1)
end
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
local walkSpeed = 10
rb.WalkSpeed = walkSpeed
local function makeCommand(cmd, value, timeline, nextActionTime)
timelines[timelineIndex + 1] = {cmd, value, timeline - lastTimeline, nextActionTime}
timelineIndex = timelineIndex + 1
lastTimeline = timeline
end코드가 이렇게바뀜. 이렇게바꿔도 이속이빨라지거나 지형을 무시하는게 안되는데 뭐가문제인거임?
댓글1
ㅋ