Repository navigation
Physics Props
rally_scripted_object places props in your map, such as cones, barrels, hydrants and crates. They can be static or movable, and destructible or indestructible.
A prop can be described in a .script file, usually in scripts/. The entity's script key points to it, for example "script" "scripts/hydrant". The .script extension is added automatically. The repository contains an annotated example: baseq3r/scripts/example.script.
rally_scripted_object
{
model "hydrant" // model block (see below)
deadmodel "waterspray" // model after it's destroyed
moveable 0 // 0 = static, 1 = movable
mass 50
health 1000 // see "Health" below
mins "-8 -8 -8"
maxs "8 8 8"
presound "sound/hydrant/metalcreak" // looped until destroyed
hitsound "sound/hydrant/solidmetalbang" // when hit
destroysound "sound/hydrant/solidmetalbreak"
postsound "sound/hydrant/waterspray" // looped after destroyed
gibs // up to 5 gib models
{
"models/mapobjects/hydrant/piece1" -3 // negative = random up to this many
"models/mapobjects/hydrant/piece2" 2
}
}
Model blocks in the same file define the MD3 and its animation frames:
hydrant
{
model "models/mapobjects/hydrant/hydrant"
damageframes "0 4" // frame for no damage ... full damage
}
Development build. You can set the physical properties directly on the entity in Radiant. They override the values from the script. A script is optional: for a simple prop, a model key is enough.
{
"classname" "rally_scripted_object"
"model" "models/mapobjects/cones/cone01.md3"
"origin" "256 128 32"
"angles" "0 45 0"
"physics" "dynamic"
"mass" "4"
"elasticity" "0.2"
"friction" "0.7"
"mins" "-4 -4 -8"
"maxs" "4 4 8"
"health" "0"
}
| Key | Range / default | Description |
|---|---|---|
model |
MD3 model path (used when there's no script) | |
script |
Optional script file, e.g. scripts/hydrant (.script is added automatically) |
|
physics |
static / dynamic
|
static = solid but doesn't move. dynamic = gravity, collisions, rotation. (Replaces the old moveable 0/1, which still works.) |
mass |
1 – 100000 | Mass |
elasticity |
0 – 1 | Bounciness |
friction |
0 – 4 | Contact friction |
rolling_friction |
0 – 1 | Resistance against rolling |
spinning_friction |
0 – 1 | Resistance against spinning |
inertia_shape |
box |
Shape used for rotation physics: box, sphere, cylinder_x, cylinder_y, cylinder_z
|
vehicle_impact_scale |
0 – 2 | How strongly cars push the prop (🧪 up to 2) |
radius 🧪 |
units | Makes the prop a ball: centred bounds, sphere collision and sphere inertia. Overrides mins/maxs. |
collision_shape 🧪 |
auto / box / sphere
|
Forces the collision shape |
vehicle_vertical_scale 🧪 |
0 – 1 (1) | Flattens car hits: scales the upward share of the contact |
vehicle_lift 🧪 |
0 – 0.9 (0) | Minimum upward share of every car hit |
max_speed 🧪 |
units/s (0 = none) | Speed cap |
never_sleep 🧪 |
0 / 1 |
1 keeps the prop simulated even when it lies still |
weapon_impact_scale |
0 – 5 | How strongly weapons push the prop |
health |
0 = indestructible | Damage the prop can take before it's destroyed |
mins / maxs
|
Collision box in local coordinates. Make it fit the visible model. |
-
healthabove0: the prop can be destroyed and switches to itsdeadmodel, gibs and sounds. -
health 0(or the legacy-1): indestructible.
ℹ️ In v0.7d,
-1means indestructible and0means the prop breaks on the first impact. The development build treats both0and-1as indestructible.
Dynamic props are simulated on the server in fixed steps and sent to all clients. Collision uses a simplified shape, not the full render mesh. If no collision hull can be built from the model, the mins/maxs box is used. Always set mins and maxs so they match the visible model.
-
The Autoball ball 🧪 is a physics prop too (
autoball_ball); its keys are the same as above. -
Use static props for heavy obstacles that shouldn't move, and dynamic props for cones, barrels and boxes.
-
Don't overdo it. Every dynamic prop costs server time and bandwidth.
-
Props near the racing line make great chaos, but keep them out of the way on the start grid.
🏁 Players
- Installation
- Controls
- Game Modes
- Autoball 🧪
- Vehicles
- Weapons and Powerups
- Maps
- Ghosts and Ghost Race
- Ladder for Players
- Client Settings
- Troubleshooting
🖥️ Server Admins
🛠️ Mappers & Modders