Jump to content

Pigs follow even at dusk/night


Recommended Posts

So awhile back I made Tamamo with infinite followers using this:

AddComponentPostInit("follower", function(self)    local old_AddLoyaltyTime = self.AddLoyaltyTime    function self:AddLoyaltyTime(time) -- overrides AddLoyaltyTime of follower component        old_AddLoyaltyTime(self, time)        if self.leader and self.leader.prefab == "tamamo" then            self.task:Cancel() -- if leader is your character, stops task telling follower to leave player after a while            self.task = nil        end    end         -- same as above, but with LongUpdate    local old_LongUpdate = self.LongUpdate    function self:LongUpdate(dt)        old_LonhUpdate(self, dt)        if self.leader and self.leader.prefab == "tamamo" then            self.task:Cancel()            self.task = nil        end    endend)

Though now looking back at it, I'm pretty sure I could've chosen one or the other, no idea why I chosen two. Anyway thats not the main question I'm asking here. I want pig followers to continue following my character without scattering/sleeping during dusk/night if possible.

 

Any help would be much loved!

Edited by rons0n
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...