Skip to content

A3D_CreateExplosion

imshooter edited this page Oct 17, 2026 · 1 revision

Push the moving physics objects around a point away from it.

The push is force at the centre and fades to nothing at radius. Objects behind a wall are pushed too.

native A3D_CreateExplosion(Float:x, Float:y, Float:z, Float:radius, Float:force, worldid = -1);

Parameters

Parameter Description Default
Float:x Centre on the X axis.
Float:y Centre on the Y axis.
Float:z Centre on the Z axis.
Float:radius Distance the explosion reaches.
Float:force Impulse at the centre, in kilograms times metres per second.
worldid Virtual world of the explosion, or -1 for every world. -1

Returns

  • The number of objects pushed.

Remarks

Only moving physics objects are pushed, along the line from the centre to their centre of mass. The push is force at the centre and shrinks evenly to nothing at radius. Like any impulse, it moves a light object more than a heavy one. Walls do not shield anything.

It shows nothing and hurts no one. Call CreateExplosion for the blast players see and feel.

Example

A grenade that also throws the objects around it.

stock Blast(Float:x, Float:y, Float:z, worldid) {
    CreateExplosion(x, y, z, 12, 6.0);
    A3D_CreateExplosion(x, y, z, 8.0, 300.0, worldid);
}

Related

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally