getBreakEffectSleepingFragmentCount
Client-side
Returns how many fragments have settled and stopped simulating.
Syntax
int|false getBreakEffectSleepingFragmentCount(break-effect theEffect)Arguments
theEffectbreak-effectBreak effect element returned by createObjectBreakEffect.
Returns
The sleeping fragment count, or false for an invalid effect.
Ownership and lifecycle
A break effect belongs to the resource that created it and is removed when that resource stops. Fragment geometry is cached per model, so repeated fractures of the same model reuse the first computed cut until the cache is cleared.
Important behavior
- This is the number to watch for performance: settled fragments no longer cost simulation.
Where this comes from
SOURCECLuaBreakEffectDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaBreakEffectDefs.cpp INTRODUCED / EXTENDED418f250d6Read the commit and why the change was made TEST RESOURCE break-test test-resources/break-test
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Object fracture effects works →