Warg Gooicing
Based on game build 714014 | Last updated: 2026-03-07
Overview
warg_gooicing is a projectile prefab used by Wargs during the Winter Feast event. Upon impact with a surface or entity, it attempts to stick to a valid target using the pinnable component; if pinning fails or the target is already pinned/dead, it deals direct damage via the combat component. The projectile is short-lived, non-persistent, and designed for rapid deployment during boss encounters.
Usage example
This component is not manually added to entities by modders. It is instantiated internally as a projectile prefabricated with the warg_gingerbread_bomb model. Example usage within mod code (e.g., to spawn manually) would be:
local proj = SpawnPrefab("warg_gooicing")
proj.Transform:SetPosition(x, y, z)
proj._caster = mywarg
proj.Physics:PushVelocity(vx, vy, vz)
Dependencies & tags
Components used: pinnable, health, combat, locomotor, transform, animstate, soundemitter, physics, network
Tags: Adds projectile; checks _combat, INLIMBO, fire, burnt, gingerbread
Properties
No public properties. The component defines only local constants and internal state (e.g., GOO_TARGET_MUST_TAGS, splashfxlist) and uses instance fields like inst._caster.
Main functions
doprojectilehit(inst, other)
- Description: Core logic executed on projectile impact. Determines a target within
TUNING.WARG_GOO_RADIUS(or usesother), then attempts to pin it usingpinnable:Stick()if eligible, otherwise deals damage. Triggers sound/visual splat effects. - Parameters:
inst(Entity) — the projectile instance.
other(Entity?, optional) — specific hit target; if omitted, auto-targeting viaFindEntity()is used. - Returns: Nothing.
- Error states: No target meets criteria (
other == nilorother == casteror missingcombatcomponent) → defaults to ground/surface impact.
TestProjectileLand(inst)
- Description: Periodically checks if the projectile has landed on the ground (Y ≤ physics radius + 0.05). If so, triggers
doprojectilehitand removes the projectile. - Parameters:
inst(Entity) — the projectile instance. - Returns: Nothing.
oncollide(inst, other)
- Description: Physics collision callback. Triggers
doprojectilehitif colliding with a valid_combat-tagged entity that is notgingerbread. - Parameters:
inst(Entity) — the projectile.other(Entity) — the colliding entity. - Returns: Nothing.
- Error states: Skips impact logic if
otheris invalid, missing_combattag, or hasgingerbreadtag.
projectilefn()
- Description: Prefab constructor. Sets up physics, animation, sound, and tags; adds
locomotorand collision callbacks on the master sim only. - Parameters: None (used as
Prefabcallback). - Returns: Entity instance (
inst) fully configured for projectile behavior. - Error states: Client-side replicas skip physics setup (
if not TheWorld.ismastersim then return inst end).
Events & listeners
- Listens to: None (uses periodic tasks instead of events).
- Pushes: None (external events like
"pinned"are pushed bypinnable:Stick(), not this component directly).