GreatSound Posted August 28, 2016 Share Posted August 28, 2016 i want to give my character to transform like wolfgang but when i copy the code over to my character it doesn't work Link to comment Share on other sites More sharing options...
. . . Posted August 28, 2016 Share Posted August 28, 2016 (edited) 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 August 28, 2016 by SuperDavid Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now