Highlight Effect Handler

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting
Revision as of 14:17, 2 October 2026 by TiMan (talk | contribs) (Add a sourced SOMA guide with explanations and stock-script examples.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The Highlight Effect Handler briefly sweeps a glow across eligible nearby objects. It scans active physics bodies, checks selected script classes and calls each entity’s _Global_CanBeHighlighted function. The response must supply a Boolean result and the entity ID in global argument 0. On-screen visibility and a minimum light level are also checked.

The stock tool script reads the HighlightActive instance variable. Its _Global_CanBeHighlighted returns that flag and supplies mBaseObj.GetID(); disabling that flag prevents this tool from being accepted by the handler.

Stock tool eligibility callback

void _Global_CanBeHighlighted()
{
    cScript_SetGlobalReturnBool(mbHighlightActive);
    cScript_SetGlobalArgID(0,mBaseObj.GetID());
}

See also