Skip to content

A3D_OnLeft

imshooter edited this page Oct 17, 2026 · 1 revision

A moving physics object left a zone.

public A3D_OnLeft(Physic:zoneid, Physic:physicid)

Parameters

Parameter Description
Physic:zoneid Zone it left.
Physic:physicid Physics object that left.

Remarks

The callback comes when an object that was inside a zone no longer overlaps it, in the script that created the zone. An object destroyed inside a zone, or a zone destroyed around an object, calls nothing.

Example

Ends a round when the ball leaves the pitch.

static Physic:gPitch;

public OnGameModeInit() {
    gPitch = A3D_CreateZone(40.0, 25.0, 6.0, 1700.0, -2500.0, 15.5);

    return 1;
}

public A3D_OnLeft(Physic:zoneid, Physic:physicid) {
    if (zoneid != gPitch) {
        return 1;
    }

    SendClientMessageToAll(-1, "The ball is out.");
    A3D_SetPosition(physicid, 1700.0, -2500.0, 14.0);
    A3D_SetVelocity(physicid, 0.0, 0.0, 0.0);

    return 1;
}

Related

  • A3D_OnEntered: A moving physics object entered a zone.
  • A3D_CreateZone: Create a box shaped zone that reports moving physics objects entering and leaving it.
  • A3D_CreateZoneSphere: Create a sphere shaped zone that reports moving physics objects entering and leaving it.

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