Jump to content

Recommended Posts

I can't understand why these commands " inst.components.locomotor:Stop()" and "inst:ClearBufferedAction()" not working in-game in this code.

local function ShedTail(inst)
    local fur = SpawnPrefab("manrabbit_tail")
    local x, y, z = inst.Transform:GetWorldPosition()
    fur.Transform:SetPosition(x, y, z)
    fur.components.inventoryitem:DoDropPhysics(x, y, z, true)
	inst.components.locomotor:Stop()
	inst:ClearBufferedAction()
	inst.AnimState:PlayAnimation("sneeze") 
	inst.components.sanity:DoDelta(-TUNING.SANITY_SUPERTINY*3)
	--inst.components.talker:Say(GetString(inst.prefab, "ANNOUNCE_SNEEZE"))
	--inst.SoundEmitter:PlaySound("hayfever/sfx/sneeze")

end

It supposed to stop character in place and play animation 'sneeze'
Character does the animation only when standing completely still and not doing anything
Maybe someone can help me figure it out

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