Jump to content

Wolfgang transformation for character


Recommended Posts

local function hungerdelta(inst)
if inst.components.hunger.current >= 100 then -- Over Let's say ur charactr has 150 hunger & when over 100 he gets these stats.
inst.AnimState:SetBuild("greatsound_full_belly") -- Example SetBuild

elseif inst.components.hunger.current <= 100 then -- Ok ur charactr has went below 100 hunger so lets change him
inst.AnimState:SetBuild("greatsound_low_belly") -- Example SetBuild

end
end

Put code above, inside character.lua above master_postinit & edit it to make what happens to your character when he goes below certain levels of hunger. Put code below inside master_postinit.

inst:ListenForEvent("hungerdelta", hungerdelta)

This should definitely work for you, I think... 

Edited by SuperDavid
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...