Skip to content

A3D_OnEntered

imshooter edited this page Oct 17, 2026 · 1 revision

A moving physics object entered a zone.

public A3D_OnEntered(Physic:zoneid, Physic:physicid)

Parameters

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

Remarks

Only moving physics objects enter zones, in the virtual world of the zone. The callback is called in the script that created the zone, after the step in which the object started to overlap it. An object that rests inside a zone stays inside it, and waking up inside calls nothing. A zone created or moved over an object calls it at the next step.

Example

static Physic:gBasket;

public OnGameModeInit() {
    gBasket = A3D_CreateZoneSphere(0.2, 1700.0, -2500.0, 15.6);

    return 1;
}

public A3D_OnEntered(Physic:zoneid, Physic:physicid) {
    if (zoneid == gBasket) {
        SendClientMessageToAll(-1, "Two points!");
    }

    return 1;
}

Related

  • A3D_OnLeft: A moving physics object left 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