Jump to content

Recommended Posts

i want to my character

- can't be freeze

-when takes 50 damage, she will use frost magic

-at the new moon she moves 1.5x faster

-at the new moon she have night vision

-when eats fish (not cooked) restores 50 sanity and 15 healt

-fridge inventory

-takes 2x damage from fire

-takes 1.5x damage from hounds

-more quickly sunstroke and takes 2x damage from sunstroke

-when running from anmy loses 5 sanity ever 3 seconds

-lose 2x sanity at full moon

-slows 0.5x at full moon

-can't attack to catcoons

can you help me for this? I really need help!..

Link to comment
https://forums.kleientertainment.com/forums/topic/68701-coding-a-character/
Share on other sites

For some things like fire damage scale, you can look at existing prefabs (in this case, Willow) and just copy the respective lines.

About the moon phases, use this code:

inst:ListenForEvent("nighttime", function(world, data)
               -- test for moonphase
               if [iDontKnowHowFromMemory] then
                    -- change things accordingly here
                    inst.components.sanity.dapperness = TUNING.DAPPERNESS_SMALL
               end
end, GetWorld())

-- Reset all at day
inst:ListenForEvent("daytime", function(world, data)
               inst.components.sanity.dapperness = 0
end, GetWorld())

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
×
  • Create New...