Mapping 104: Function Entities

In Quake 3 mapping, entities prefixed with "func\_" are functional entities that add specific behaviors or functions to your map. These entities play a crucial role in defining the interactive elements and logic within your level. The "func\_" prefix indicates that the entity is a functional entity, meaning it has a specific purpose or behavior in the game. Let's take an example like "func\_door." If you create a func\_door entity, it will set-up a door in your map that can be opened and closed. These func\_ entities interact with players or other entities based on their predefined functions.

#### Properties and Settings

Each func\_ entity comes with its own set of properties and settings that you can configure. For a func\_door, these settings might include the speed of the door, the sound it makes when opening, and whether it requires a specific trigger to activate.

#### Logic and Triggers

func\_ entities often work in conjunction with triggers or other entities to create specific events or actions. Triggers can be used to activate func\_ entities based on player actions or other in-game events.

In summary, func\_ entities in Quake 3 mapping are the building blocks for adding interactive and functional elements to your level. By placing and configuring these entities, you can create a dynamic and engaging environment where players can interact with various elements like doors, elevators, platforms, and more.

## Functions

### func\_plat

Represents a platform that can move up and down, usually used for elevators, but generally speaking func\_doors are used more.

### func\_button

A button that players can interact with to trigger events or open doors.

### func\_door

Represents a door that can open and close, providing access to different areas of the map. A few important things to note:

1. If you have two doors you want to open at the same time, make sure they are seperate entities and set their team value to something of the same name (example, team "sidedoors")
2. At least a wait of 1 is recommended, or else you may trigger the doors to open and close too quickly. An easier set-up is to have a trigger\_multiple targetting doors.
3. The key and value pair 'doorTrigger' to '1' makes it so that spectators can go through locked doors.
4. Often times having the doors not fully close is useful, this is done with the 'lip' key
5. Mappers will use func\_doors as elevators on occasion. The key to getting your func\_door to go up or down to the spot you want it to is by also making a hidden clip brush going up the full length of the distance you want the elevator to travel. You can also use the lip key to help assist with this.
6. Placing a structural skip brush inside the boundaries of your door with one of the faces an Areaportal system brush, will help cull rendering between rooms. Try to make sure the area portal is in the center of your doors.

### func\_static

A static, non-moving entity often used for decorative purposes.

### func\_rotating

An entity that rotates, need an origin brush connected to it in the center for the origin of the entity to rotate around!

### func\_bobbing

Represents an entity that moves in a bobbing motion, useful for creating floating platforms. Also requires an origin brush.

### func\_pendulum

Similar to func\_bobbing but swings like a pendulum.

### func\_train

Represents a moving platform or train that follows a predefined path. Also requires an origin brush!

### func\_group

Helps group multiple primitives together for easier manipulation, but doesn't have a visible effect in-game by default.

Simply select the brush you want to group and right click this icon.

Func\_groups do have further customization outside of making it easier to select complex groupings of brushwork. You can apply a few values to them to help with lighting:

##### \_ls / \_lightmapscale

Floating point value scaling the resolution of lightmaps on brushes/patches in this entity (default 1.0). Decreasing this number increases the resolution. The default value is 1, try values of 2/4/8/etc to lower quality or 0.5/0.25/0.125 to increase it.

This is a really important final lighting process to help polish up any bad quality shadows of your map.

#### \_cs / \_castshadows

Allows per-entity control over shadow casting. Defaults to 0 on entities, 1 on world. 0 = no shadow casting. 1 = cast shadows on world. > 1 = cast shadows on entities with \_rs (or \_receiveshadows) with the corresponding value, AND world. Negative values imply same, but DO NOT cast shadows on world.

#### \_rs / \_receiveshadows

Allows per-entity control over shadow reception. Sometimes you get weird shadows cast on your brushwork, try grouping an area and giving it \_rs 0 to avoid those funky shadows being generated.

#### \_shadeangle (\_sa) / \_smoothnormals (\_sn) /\_smooth (\_smooth)

* This key determines the angle, in degrees, beyond which the lighting on a surface becomes "hard" or unsmoothed. In other words, if the angle between the surface normal and the incoming light direction is greater than the specified shade angle, the lighting will appear flat or faceted.

* This key is used to enable or disable smooth shading on a surface. When smooth shading is enabled, adjacent polygons share normals at their vertices, creating a smooth transition between them. When smooth shading is disabled, each polygon has its own distinct normals, resulting in a faceted appearance.

* When set to a specific value (usually 1 or true), it indicates that the surface should be rendered with smooth shading.
* As of 2024, this keyis not confirmed entirely. NRC still needs to make surfs nonplanar via shader for this to function (or via q3map2 arg)

#### Terrain keys

There are also ways to map the terrain of your map to a single image.

For non-related terrain methods, I recommend looking at SimonOC's tutorial series to learn more about terrain mapping.

### func\_timer

Represents a timer that triggers events after a specified amount of time, often used in combination with triggers.

### func\_breakable

Represents a breakable object that can be destroyed by players, adding a destructible element to the map.

### func\_glass

Represents a glass surface that can be broken, providing a visual effect or altering gameplay.

### func\_usable

An entity that players can use, typically for interactive elements like switches or levers.

### func\_wall

Represents a wall with specific functionality, often used for special effects or scripted events.

Each of these entities has specific properties and behaviors that you can configure to achieve different effects in your map. Experimenting with these entities and their settings will allow you to create diverse and engaging environments for players to explore.

Let's move on to the next 104 lesson: Mapping 104: Targets