Charlieresidue
Based on game build 714014 | Last updated: 2026-03-04
Overview
charlieresidue is a classified client-side prefab that creates a persistent visual effect (residue) attached to a target entity. It is typically instantiated by Charlie-related abilities (e.g., Winona's Charlie技能) to visually indicate an active effect on a target. The component manages a nested FX entity (charlieresidue animstate build) and synchronizes its lifecycle with the target. It decays (transitions to post-animation and removes itself) when activated by an inspectable user or when the viewer lacks Rose glasses vision.
Key behaviors:
- Attaches a client-only FX entity to the target for visual rendering.
- Uses
CLASSIFIEDtag andnet_entitysynchronization for secure target assignment. - Supports Rose glasses vision detection via
playervision:HasRoseGlassesVision(). - Responds to activatable interactions via
activatable.OnActivate, triggering immediate decay. - Provides map action context support for UI interaction (e.g., pulling up map on interaction).
Usage example
local inst = CreateEntity()
inst:AddTag("CLASSIFIED")
-- ... configure transform and network ...
inst:SetFXOwner(player)
inst:SetTarget(target_entity)
inst:SetMapActionContext(CHARLIERESIDUE_MAP_ACTIONS.INSPECT)
Dependencies & tags
Components used:
activatable(added; used forOnActivatecallback)inspectable(added on master)playervision(accessed viaowner.components.playervision)roseinspectableuser(accessed viadoer.components.roseinspectableuser)
Tags:
CLASSIFIED(added unconditionally)NOBLOCK(added to FX entity)FX(added to FX entity duringpstanimation)NOCLICK(added duringpstanimation and afterDecay)action_pulls_up_map(added conditionally whenmapactioncontext > NONE)
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
_animstate | net_tinybyte | 0 | Networked animstate (pre=0, idle=1, pst=2). |
_mapactioncontext | net_tinybyte | 0 | Networked map action context (see CHARLIERESIDUE_MAP_ACTIONS). |
_target | net_entity | nil | Networked target entity reference. |
_fx | entity | nil | Local FX entity (client only; nil after pst). |
killed | boolean | false | Internal flag marking if decay has started. |
valid_map_actions | table | {[ACTIONS.ACTIVATE] = true} | Map of actions that trigger map UI on interaction. |
Main functions
SetFXOwner(owner)
- Description: Assigns the owner entity and initializes client-side FX if owner has HUD. Begins listening for deactivation or Rose glasses vision changes to trigger decay.
- Parameters:
owner(entity ornil) — The player/entity responsible for this residue. - Returns: Nothing.
- Error states: No-op if
_inittaskhas already been canceled (i.e., init already completed).
SetTarget(target)
- Description: Sets and synchronizes the target entity via
net_entity. Adjusts physics radius override to match target. - Parameters:
target(entity ornil) — Entity to attach the residue to. - Returns: Nothing.
SetMapActionContext(context)
- Description: Sets the map action context and toggles the
action_pulls_up_maptag accordingly. - Parameters:
context(number) — One ofCHARLIERESIDUE_MAP_ACTIONSconstants. - Returns: Nothing.
Decay()
- Description: Initiates decay: transitions animstate to
pst, clears FX target, detaches and removes FX entity, addsNOCLICK, and schedules removal after0.5seconds. - Parameters: None.
- Returns: Nothing.
OnActivate(inst, doer)
- Description: Handler for
activatable.OnActivate. Immediately triggersDecay()and notifiesroseinspectableuserif present. - Parameters:
inst(entity) — This residue instance.doer(entity ornil) — The entity activating the residue.
- Returns: Nothing.
GetTarget()
- Description: Returns the current target entity.
- Parameters: None.
- Returns:
entity or nil
GetMapActionContext()
- Description: Returns the current map action context value.
- Parameters: None.
- Returns:
number— CurrentCHARLIERESIDUE_MAP_ACTIONSconstant.
Events & listeners
-
Listens to:
onremove— Removes this instance when target is removed (on master).ondeactivateskill_server— TriggersDecay()if skill"winona_charlie_1"is deactivated (only under Rose glasses vision).roseglassesvision— TriggersDecay()if vision is disabled (only under Rose glasses vision).animstatedirty— Synchronizes FX animstate on client.targetdirty— Updates FX target on client.
-
Pushes: None (does not push custom events).