Jump to content

Recommended Posts

Hey guys I'm having a little problem herding my Volt Goats at the moment. I kill the entire herd but one and chase him a good ways to my base and into a pen. The only problem is when I get him into the pen he always tries to escape to the spawn point. I've re logged on and tried multiple times but can't seem to figure the problem out. Thanks guys 

Link to comment
https://forums.kleientertainment.com/forums/topic/67974-volt-goats/
Share on other sites

6 hours ago, CutChemist said:

Hey guys I'm having a little problem herding my Volt Goats at the moment. I kill the entire herd but one and chase him a good ways to my base and into a pen. The only problem is when I get him into the pen he always tries to escape to the spawn point. I've re logged on and tried multiple times but can't seem to figure the problem out. Thanks guys 

Have you check again and know for sure there isn't any other goat leave at the spawn?

May be a new one just spawn while you were relocating that single volt goat.

6 hours ago, CutChemist said:

Hey guys I'm having a little problem herding my Volt Goats at the moment. I kill the entire herd but one and chase him a good ways to my base and into a pen. The only problem is when I get him into the pen he always tries to escape to the spawn point. I've re logged on and tried multiple times but can't seem to figure the problem out. Thanks guys 

Yeah, this just happens. Can't do anything about it. Sorry.

51 minutes ago, Mday said:

Have you check again and know for sure there isn't any other goat leave at the spawn?

May be a new one just spawn while you were relocating that single volt goat.

I'm guessing that might be it, I'll try a few more times they keep spawning as I'm herding the one then I guess no volt goat pen feelsbadman

When a goat runs away, the herd position doesn't recalculate and update fast enough.

And a member that is too far away from the herd doesn't affect the herd position recalculation.

So if you want a pen, you are going to need pan flutes / ice staffs, so you can move the volt goat around by pushing it when sleeping / frozen.

That would move it slow enough to update the herd position to move it with the goat.

3 hours ago, DarkXero said:

When a goat runs away, the herd position doesn't recalculate and update fast enough.

And a member that is too far away from the herd doesn't affect the herd position recalculation.

So if you want a pen, you are going to need pan flutes / ice staffs, so you can move the volt goat around by pushing it when sleeping / frozen.

That would move it slow enough to update the herd position to move it with the goat.

I tried freezing them but I can't push them . I'll try again when it's asleep. What exactly are the mechanics behind the spawn reset?

 

9 hours ago, CutChemist said:

I tried freezing them but I can't push them . I'll try again when it's asleep.

I just froze a goat with an ice staff and I could push it by running against it.

If you are in a server with caves, enter ThePlayer:EnableMovementPrediction(false) and try pushing them again.

9 hours ago, CutChemist said:

What exactly are the mechanics behind the spawn reset?

There is no spawn reset.

An invisible entity just exists with the goats, and manages them. When all goats die, that entity gets removed.

That entity acts as an anchor for the herd members, they won't wander very far from it.

What happens is that periodically, that invisible entity moves.

    if self.membercount > 0 then
        if self.updaterange ~= nil then
            local updatedPos = nil
            local validMembers = 0
            local toremove = {}
            for k, v in pairs(self.members) do
                if k.components.herdmember == nil
                    or (self.membertag ~= nil and not k:HasTag(self.membertag)) then
                    table.insert(toremove, k)
                elseif self.updatepos
                    and k.components.combat ~= nil
                    and k.components.combat.target == nil
                    and self.inst:IsNear(k, self.updaterange) then
                    updatedPos = updatedPos ~= nil and updatedPos + k:GetPosition() or k:GetPosition()
                    validMembers = validMembers + 1
                end
            end
            for i, v in ipairs(toremove) do
                self:RemoveMember(v)
            end
            if updatedPos ~= nil then
                self.inst.Transform:SetPosition(updatedPos.x / validMembers, 0, updatedPos.z / validMembers)
            end
        end
        if self.membercount > 0 then
            local herdPos = self.inst:GetPosition()
            for k, v in pairs(self.members) do
                if k.components.knownlocations ~= nil then
                    k.components.knownlocations:RememberLocation("herd", herdPos)
                end
            end
        end
    end

As you can see here in the code, if the herd has more than 1 member:

- Non members accidentally put in the members section get removed.

- If a member doesn't have a target, and it is near the herd point, it will contribute to the new position calculation.

- After all members are polled and asked for their contribution to the new position, the new position is assigned, and the members are told where it is.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...