JaccK1618 Posted June 15, 2021 Share Posted June 15, 2021 Hello. I am currently working on an already existing mod that adds bigfoot into DST. It is old and I have been working on its bugs. On of them is the issue that Bigfoot will ignore water and act like it is land. Does anybody know any way to fix this? I can send you the code if you need it. Link to comment https://forums.kleientertainment.com/forums/topic/130869-need-help-with-bigfoot-stepping-parameters/ Share on other sites More sharing options...
JaccK1618 Posted June 17, 2021 Author Share Posted June 17, 2021 Ok, here's the code I think has to do with it. function BigFooter:IsOnScreen(pos) for k, v in pairs(AllPlayers) do if pos:Dist(v:GetPosition()) < 50 then return true end end return false end function BigFooter:CheckForWater(pos) local test = function(offset) local testPoint = pos + offset local ground = TheWorld local tile = ground.Map:GetTileAtPoint(testPoint.x, testPoint.y, testPoint.z) if tile == GROUND.IMPASSABLE then return true end end return FindValidPositionByFan(0, 4, 4, test) end function BigFooter:FindNearbyLand(pos) local test = function(offset) local testPoint = pos + offset local ground = TheWorld local tile = ground.Map:GetTileAtPoint(testPoint.x, testPoint.y, testPoint.z) if tile ~= GROUND.IMPASSABLE then return self:CheckForWater(testPoint) == nil end end return FindValidPositionByFan(0, 6, 8, test) end The issue here is that the oceans are different from their singleplayer counterpart, but it has changed now and the code doesn't work Link to comment https://forums.kleientertainment.com/forums/topic/130869-need-help-with-bigfoot-stepping-parameters/#findComment-1469552 Share on other sites More sharing options...
Monti18 Posted June 19, 2021 Share Posted June 19, 2021 I think the problem is that BigFooter:CheckForWater(pos) is checking if the ground is impassable, but the water is now not impassable. In ocean_util.lua there is a function IsLandTile, you could try to call it that to check it if it's land. 2 Link to comment https://forums.kleientertainment.com/forums/topic/130869-need-help-with-bigfoot-stepping-parameters/#findComment-1470343 Share on other sites More sharing options...
JaccK1618 Posted June 19, 2021 Author Share Posted June 19, 2021 8 hours ago, Monti18 said: I think the problem is that BigFooter:CheckForWater(pos) is checking if the ground is impassable, but the water is now not impassable. In ocean_util.lua there is a function IsLandTile, you could try to call it that to check it if it's land. What should I do if I find it? Link to comment https://forums.kleientertainment.com/forums/topic/130869-need-help-with-bigfoot-stepping-parameters/#findComment-1470461 Share on other sites More sharing options...
Monti18 Posted June 19, 2021 Share Posted June 19, 2021 You could try changing function BigFooter:CheckForWater(pos) local test = function(offset) local testPoint = pos + offset local ground = TheWorld local tile = ground.Map:GetTileAtPoint(testPoint.x, testPoint.y, testPoint.z) if tile == GROUND.IMPASSABLE then return true end end return FindValidPositionByFan(0, 4, 4, test) end to function BigFooter:CheckForWater(pos) local test = function(offset) local testPoint = pos + offset local ground = TheWorld local tile = ground.Map:GetTileAtPoint(testPoint.x, testPoint.y, testPoint.z) if tile == GROUND.IMPASSABLE or tile == GROUND.INVALID or tile > GROUND.UNDERGROUND then return true end end return FindValidPositionByFan(0, 4, 4, test) end This is then checking if the tile is ocean or another tile that cannot be used. This is just the contrary of the IsLandTile function. 2 Link to comment https://forums.kleientertainment.com/forums/topic/130869-need-help-with-bigfoot-stepping-parameters/#findComment-1470465 Share on other sites More sharing options...
JaccK1618 Posted June 19, 2021 Author Share Posted June 19, 2021 50 minutes ago, Monti18 said: You could try changing function BigFooter:CheckForWater(pos) local test = function(offset) local testPoint = pos + offset local ground = TheWorld local tile = ground.Map:GetTileAtPoint(testPoint.x, testPoint.y, testPoint.z) if tile == GROUND.IMPASSABLE then return true end end return FindValidPositionByFan(0, 4, 4, test) end to function BigFooter:CheckForWater(pos) local test = function(offset) local testPoint = pos + offset local ground = TheWorld local tile = ground.Map:GetTileAtPoint(testPoint.x, testPoint.y, testPoint.z) if tile == GROUND.IMPASSABLE or tile == GROUND.INVALID or tile > GROUND.UNDERGROUND then return true end end return FindValidPositionByFan(0, 4, 4, test) end This is then checking if the tile is ocean or another tile that cannot be used. This is just the contrary of the IsLandTile function. You did it. Thank you. 1 Link to comment https://forums.kleientertainment.com/forums/topic/130869-need-help-with-bigfoot-stepping-parameters/#findComment-1470493 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now