Quagmire Slaughtertool
Based on game build 714014 | Last updated: 2026-03-06
Overview
The quagmire_slaughtertool prefab is an inventory item that supplies the dynamic action string displayed in the UI when performing a slaughter action in the Quagmire. It does not perform combat or logic itself, but serves as the source of the string returned by GetSlaughterActionString. The string is randomly selected from STRINGS.ACTIONS.SLAUGHTER and cached per target for .1 seconds to avoid flickering.
Usage example
local inst = ThePlayer
if inst.components.inventory ~= nil then
inst.components.inventory:Equip("quagmire_slaughtertool")
end
-- Later, when a compatible target is in range:
local action_str = inst:GetSlaughterActionString(inst, target_entity)
-- action_str now holds a randomized slaughtering action phrase
Dependencies & tags
Components used: None identified
Tags: None identified
Properties
No public properties
Main functions
GetSlaughterActionString(inst, target)
- Description: Returns a randomizedslaughter action string from
STRINGS.ACTIONS.SLAUGHTER, cached per target for.1seconds to prevent UI flicker on repeated calls. - Parameters:
inst(entity) — the inst拥有 the function (typically the player).target(entity) — the target being slaughtered; used for cache invalidation.
- Returns: string — a randomly selected action phrase.
- Error states: Returns
nilonly ifGetRandomItemfails (e.g.,STRINGS.ACTIONS.SLAUGHTERis empty), but this is not expected in normal operation.
Events & listeners
None identified