Skip to content

setObjectBreakProfile

Client-side

Available in Neon, not standard MTA

Gives an object durability so ordinary GTA damage fractures it on its own.

Syntax

bool setObjectBreakProfile(object theObject [, table options])

Arguments

theObjectobject

Streamed object element.

optionstableoptional

Durability keys health, native, damageMultiplier and instantBreakThreshold, plus any fracture option.

Table keys

Durability

healthfloatoptional

Durability consumed by native GTA object damage. The object fractures at zero.

nativebooloptional

Whether GTA's native break path stays in play alongside the managed profile.

damageMultiplierfloatoptional

Scales incoming native damage before it is subtracted from health.

instantBreakThresholdfloatoptional

A single hit above this value fractures the object outright.

Fragments

fragmentsintoptional

How many pieces the object is cut into.

forcefloatoptional

Outward impulse applied to the fragments.

randomnessfloatoptional

Variation in the cut and the impulse, 0 for uniform.

seedintoptional

Fixes the cut. The same seed produces the same pieces, which is how two clients can match.

velocitytableoptional

Extra starting velocity as {x, y, z}, added on top of force.

Physics

gravityfloatoptional

Gravity applied to the fragments.

bouncefloatoptional

How much fragments rebound off surfaces.

dragfloatoptional

Air drag slowing the fragments.

lifetimeintoptional

How long fragments live, in milliseconds.

Presentation

renderDistancefloatoptional

Distance beyond which fragments stop drawing.

hideOriginalbooloptional

Hide the source object when it fractures.

disableOriginalCollisionbooloptional

Drop the source object's collision when it fractures.

Returns

true when the profile was applied; false for an invalid object or options.

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
  • Neon consumes GTA's native per-impact object damage. The fracture happens when health reaches zero, or when one hit exceeds instantBreakThreshold.
  • This lets an ordinary runtime model break under gunfire without the DFF breakable plugin.

Example

setObjectBreakProfile(theObject, { health = 500, instantBreakThreshold = 200 })

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →