Repository navigation
A3D_CreateArea
imshooter edited this page Oct 17, 2026
·
1 revision
Create four walls around a rectangle on the ground.
stock bool:A3D_CreateArea(
Float:minX,
Float:minY,
Float:maxX,
Float:maxY,
Float:minZ,
Float:maxZ,
Physic:walls[4],
worldid = -1,
Float:width = 0.2
)| Parameter | Description | Default |
|---|---|---|
Float:minX |
West edge. | |
Float:minY |
South edge. | |
Float:maxX |
East edge. | |
Float:maxY |
North edge. | |
Float:minZ |
Bottom of the walls. | |
Float:maxZ |
Top of the walls. | |
Physic:walls[4] |
The four walls created, south, north, west and east. | |
worldid |
Virtual world they collide in, or -1 for every world. |
-1 |
Float:width |
Thickness of each wall, outside the rectangle. | 0.2 |
-
truewhen the four walls were created. -
falsewhen the rectangle is empty, or the world is full.
A stock of the include that creates four static boxes with A3D_CreateStaticBox. The walls stand outside the rectangle, so the whole rectangle stays free inside. The south and north walls run past the corners by width, which closes the corners.
When a wall cannot be created, the walls already created are destroyed and the function returns false. Each wall is a static object of its own, destroyed with A3D_DestroyObject.
Keeps the balls of a game inside a pitch.
static Physic:gPitch[4];
public OnGameModeInit() {
if (!A3D_CreateArea(1680.0, -2520.0, 1720.0, -2480.0, 12.5, 15.5, gPitch)) {
print("The pitch could not be walled.");
}
return 1;
}
public OnGameModeExit() {
for (new i; i != sizeof (gPitch); ++i) {
A3D_DestroyObject(gPitch[i]);
}
return 1;
}- A3D_CreateStaticBox: Create an invisible box that never moves, such as a wall or a floor.
- A3D_DestroyObject: Destroy a physics object, a static object or a zone, and the global object that shows it.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions