Jump to content

HELP! Character with pet


miunyan

Recommended Posts

Hi! Nice to meet you ^///^

I'm working on a Don't Starve Together character for the first time and I want to make a pet (cat) follow her. Is it possible?

 

Thanks for passing by.  :wilson_flower: 

 

It'd probably be pretty easy to just re-skin chester and copy all of his code and just remove the bits of code that allow him to be a container to store stuff in

Link to comment
Share on other sites

Hi! Nice to meet you ^///^

I'm working on a Don't Starve Together character for the first time and I want to make a pet (cat) follow her. Is it possible?

 

Thanks for passing by.  :wilson_flower: 

inst:AddComponent("childspawner")    inst.components.childspawner.childname = "catcoon"    inst.components.childspawner:StartSpawning() -- spawns catcoon on join    inst.components.childspawner.maxchildren = 1 --dont want to spam the screen with cats	if inst.components.leader then        local x,y,z = inst.Transform:GetWorldPosition()        local ents = TheSim:FindEntities(x,y,z, 100, {"catcoon"})        for k,v in pairs(ents) do            if v.components.follower then                inst.components.leader:AddFollower(v)            end        end        for k,v in pairs(inst.components.leader.followers) do            if k:HasTag("soul") and k.components.follower then                k.components.follower:AddLoyaltyTime(3)                  end           end   end

not exactly sure if it works in DST, but it works in DS, so maybe :v

Link to comment
Share on other sites

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...