• Content count

  • Joined

  • Last visited

 Content Type 




Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by renetta96

  1. I have some custom prefabs with their own animation file (the .scml file). Everything works OK, except when I try to freeze them. There is no "frozen ice" effect, only their colors are modified to light blue. I dig deeper into the code, and see this in stategraph: 

    local function onenterthawpre(inst)
        if inst.components.locomotor ~= nil then
        inst.AnimState:PlayAnimation("frozen_loop_pst", true)
        inst.SoundEmitter:PlaySound("dontstarve/common/freezethaw", "thawing")
        inst.AnimState:OverrideSymbol("swap_frozen", "frozen", "frozen")

    However, I checked some ingame animation, there is no symbol swap_frozen. This is so magic... How can I get my custom prefab to have this frozen animation? Please help. 

  2. For 1 and 2, just take a look at `combat` component. There should be enough events for you to handle and customize.

    For 3, also take a look at `combat` component. What I often do for this kind of feature is having a counter. When he hits, set it to, for example, 5. Then start a DoTaskInTime in 1 sec if this task doesn't already exist. Then in the callback, gain health and decrease counter. If counter still > 0, start another task, otherwise don't.