Jump to content

Character Transformation into a Bunnyman


Recommended Posts

Well... this is far as coding can go for me. So, I was wondering if anyone could help me figure out how to do this. What I am trying to do is make a transformation of a character into a bunnyman. How I want it to happen is when the character's hunger reaches lower than or equal to 46, he transforms into a bunnyman and has to eat grass and twigs to regain his hunger back to 50. Anyone have any ideas how I could make that possible?

Link to comment
Share on other sites

the bunnyman have multiple anim files so I'm not sure if you need to use all of them but can try using owner.AnimState:SetBuild("manrabbit_build").  Just need to make sure you have the bunnyman_build.zip asset in your anim folder and you add it to the assets table. Look at wolfgang.lua to see how he changes when his hunger hit a certain threshold.  It uses inst:ListenForEvent("hungerdelta", onhungerchange) and  if inst.components.hunger.current < TUNING.WOLFGANG_END_MIGHTY_THRESH.  To eat twigs and grass you need to use the inst.components.eater:SetDiet({  }, {  }) functions.

Link to comment
Share on other sites

On ١١‏/٣‏/١٤٤٠ هـ at 5:38 AM, Wolf_EX said:

try using owner.AnimState:SetBuild("manrabbit_build").  Just need to make sure you have the bunnyman_build.zip asset in your anim folder and you add it to the assets table.

Isn't making a 2nd skin in the character_none.lua file and setting the character's skin mode to the bunnyman skin better than directly setting the animstate's build like that? I believe Klei did that for Woodie.

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