Entities are the second major component of Quake MAP files. An entity is basically a bit like a thing, but they also function as triggers and as pathmarkers. Adding entities will affect your build time, because solid entities (monsters, weapons, armor, ammo, health) have to be lit, so that's one more item for LIGHT to deal with. A map with 30 lights can shoot to 200 entities for Light.exe to process once you put in monsters, armor, weapons, and ammo.
There are two types of entities, a general entity statement and an attached entity statement. The general statement does not attach to a brush and includes things like armor, weapons, ammo, monsters, and lights. Attached entities are things like doors, teleporters, and triggers.
In Qoole, you add entities by right clicking where you want to place the entity and scrolling through the menu of items:
Select the entity you want from the pull down menu at the top. Be careful not to let the entity get stuck in a brush. If it's stuck in the brush, chances are the item will fall out of the map or you'll get an error in QBSP.
After placing the entity, you can edit its properties by selecting that entity, then clicking on Entity on the bottom left. For spawnflags with multiple options, Qoole gives you a pulldown menu with the options for you to choose from. See below for more on spawflags. One nice feature of Qoole is that it provides a wireframe rendering of the entity, so you can see how much space it will occupy.
For rotating items (weapons, armor), you will also see lines on the perimeter of the item to give you an idea how much room the item needs to rotate without getting stuck on a wall.
I believe that anything with an origin tag can have an optional 'spawnflags' tag. This is not confirmed, however. Tags can be combined by addition or bitwise or (really the same thing).
Most entities are stand-alone. That is, things like direction or spawnflags, are all you need. For some entities, like a door or gate, you need a "target" and "targetname" to tie the two together. For example, you tie a func_button (a button) or any one of several trigger_ entities (triggers) to a func_door (door, gate) to open a door or gate. This will be discussed in later chapters.
The handling of spawnflags is fairly straightforward in Qoole. Simply click on the Entities button on the bottom left and the item's entity menu will come up, or right click on the screen and select Add Entity. Simple items like armor, ammo, and weapons don't have much, just the basic Not in Easy, Not in hard, etc. These are used for setting the availability of items in various skill levels. This also works with monsters.
Qoole is a good editing in its handling of spawnflags. It makes almost all of the spawnflags available from a pulldown menu and it explains what they are. Look at the screen capture above for the health item. There can't be much doubt in your mind what each setting is going to do.
A trick: Add two health items in the same area. For the first health item, select "Don't appear if Skill 2" from the spawnflags pulldown menu. For the second health item, select "Rotten" and "Don't appear if Skill 0" and "Don't appear if Skill 1" in the spawnflags. This way, Easy and Normal gives the player a 25 HP health. Hard gives them only 15 HP.
You can set the direction in which nail traps fire and doors open by using an angle, from 0 to 359, based on an overhead view. 0 degrees is east/right, 90 degrees is north (or up on your screen), 180 is west (left) and 270 is south, plus a direction of -1 to go up and -2 to go down. Obviously you do this in perspective to your map setup.
Make it appropriate for the door and walls. If a door is in a north wall, make the door open by going west (180), east (0), or up or down. If you make it go south (270), well, that's lame. If it goes north, so it appears to be backing away from the player, make sure to give them enough room to get in and around it.
Platforms are not affected by this, because are automatically triggered when you walk over them. Floating platforms aren't affected since you use the target and targetname to dictate the direction of a path_corner entity. (more on that later).
You don't have to use the 360 degrees method for players, teleporters, or monsters. Qoole uses a drag method to determine which way the walking entities face. This method applies to the player start, DM player start, teleport destination, and monsters.
Select the entity, click on Rotate Object on the menu bar, then click on the entity and move the mouse left/right or up/down to make it rotate and change its direction. You will see the wireframe turn appropriately. This is a less-than-smooth process because of the redraw, so fine tuning the positioning can be a pain.
The entities define the monsters, things, but also the positions in space where something must happen. So they are the Quake equivalent of both the THINGS and the LINEDEF types from DOOM.
The entity definitions are made up of a series of specific details that define what each is, where it starts, when it appears etc. Each specific is followed by a modifier that arguments it. All definitions have the classname specific that identifies that entity. The classname specifics relate intimately with the code lump and are the names of functions written in Quake C.
I have chosen the terms ``specific'' and ``arg'' for the two different parts of each detail of the definition. These terms may or may not suit but, they will have to do until we learn what id calls them.
-------------------------------------------------------------------------------- "classname" "name" // Type of entity to be defined (mandatory) "origin" "X Y Z" // Coordinates of where it starts in space. "angle" "#" // Direction it faces or moves (sometimes in degrees) "light" "#" // Used with the light classname. "target" "t#" // Matches a targetname. "targetname" "t#" // Like a linedef tag. "killtarget" "#" // Removes target when triggered? "spawnflags" "#" // Used to flag/describe an entity that is not default. "style" "#" // Used to flag/describe an entity that is not default. "message" "string" // Message displayed when triggered (\n for linebreaks) "mangle" "X Y Z" // Point where the intermission camera looks at
Note: The term model refers to a combination of a brush and an entity. One or more brushes are bound to an entity, which controls the behavior of the brushes. All brushes are contained within models.
The model numbers in the compiled BSP (*x) comes from the order in which the models are stored in the models structure. These numbers are originally derived from the order of the models in the source MAP file.
The worldspawn model is a bounding box that defines the extents of the whole world.
The models are defined by a bounding box of the max and min(x,y,z). Therefore they are always parallel to the horizontal planes. This bounding box is simply used for speeding up collision detection and will not affect the movement of the models themselves.
It dawned on me that these haven't been well defined in this page. So let's run them down, so when I make references to them further on in the page you aren't left wondering what it is in the first place.
air_bubbles : Rising bubbles ambient_drip : Dripping sound ambient_drone : Engine/machinery sound ambient_comp_hum : Computer background sounds ambient_flouro_buzz : Flourescent buzzing sound ambient_light_buzz : Buzzing sound from light ambient_suck_wind : Wind sound ambient_swamp1 : Frogs croaking ambient_swamp2 : Slightly different sounding frogs croaking ambient_thunder : Thunder sound event_lightning : Lightning (Used to kill Cthon, shareware boss) func_door : Door func_door_secret : A door that is triggered to open func_wall : A moving wall? func_button : A button func_train : A platform (moves along a "train") func_plat : A lift/elevator func_dm_only : A teleporter that only appears in deathmatch func_illusionary : Creates brush that appears solid, but isn't. info_null : Used as a placeholder (removes itself) info_notnull : Used as a placeholder (does not remove itself) info_intermission : Cameras positioning for intermission (?) info_player_start : Main player starting point (only one allowed) info_player_deathmatch : A deathmatch start (more than one allowed) info_player_coop : A coop player start (more than one allowed) info_player_start2 : Return point from episode info_teleport_destination : Gives coords for a teleport destination using a targetname All item_ tags may have a target tag. It triggers the event when the item is picked up. item_cells : Ammo for the Thunderbolt item_rockets : Ammo for Rocket/Grenade Launcher item_shells : Ammo for both Shotgun and SuperShotgun item_spikes : Ammo for Perforator and Super Perforator item_weapon : Generic weapon class item_health : Medkit item_artifact_envirosuit : Environmental Protection Suit item_artifact_super_damage : Quad Damage item_artifact_invulnerability : Pentagram of Protection item_artifact_invisibility : Ring of Shadows (Invisibility) item_armorInv : Red armor item_armor2 : Yellow armor item_armor1 : Green armor item_key1 : Silver Key item_key2 : Gold Key item_sigil : Sigil (a rune) light : A projected light. No visible lightsource. light_torch_small_walltorch : Small wall torch (gives off light) light_flame_large_yellow : Large yellow fire (gives off light) light_flame_small_yellow : Small yellow fire (gives off light) light_flame_small_white : Small white fire (gives off light) light_fluoro : Fluorescent light? (Gives off light, humming sound?) light_fluorospark : Fluorescent light? (Gives off light, makes sparking sound) light_globe : Light that appears as a globe sprite monster_army : Grunt monster_dog : Attack dog monster_ogre : Ogre monster_ogre_marksman : Ogre (no different from monster_ogre) monster_knight : Knight monster_zombie : Zombie monster_wizard : Scragg (Wizard) monster_demon1 : Fiend (Demon) monster_shambler : Shambler monster_boss : Cthon (Boss of Shareware Quake) monster_enforcer : Enforcer monster_hell_knight : Hell Knight monster_shalrath : Shalrath monster_tarbaby : Slime monster_fish : Fish monster_oldone : Shubb-Niggurath (requires a misc_teleportrain and a info_intermission) misc_fireball : Small fireball (gives off light, harms player) misc_explobox : Large Nuclear Container misc_explobox2 : Small Nuclear Container misc_teleporttrain : Spiked ball needed to telefrag monster_oldone path_corner : Used to define path of func_train platforms trap_spikeshooter : Shoots spikes (nails) trap_shooter : Fires nails without needing to be triggered. trigger_teleport : Teleport (all trigger_ tags are triggered by walkover) trigger_changelevel : Changes to another level trigger_setskill : Changes skill level trigger_counter : Triggers action after it has been triggered count times. trigger_once : Triggers action only once trigger_multiple : Triggers action (can be retriggered) trigger_onlyregistered : Triggers only if game is registered (registered == 1) trigger_secret : Triggers action and awards secret credit. trigger_monsterjump : Causes triggering monster to jump in a direction trigger_relay : Allows delayed/multiple actions from one trigger trigger_push : Pushes a player in a direction (like a windtunnel) trigger_hurt : Hurts whatever touches the trigger weapon_supershotgun : Super Shotgun weapon_nailgun : Nailgun weapon_supernailgun : Super Nailgun weapon_grenadelauncher : Grenade Launcher weapon_rocketlauncher : Rocket Launcher weapon_lightning : Lightning Gun
The use of these entities will be discussed in other chapters.
Portions Copyright ©1996-97 Niklata and Thomas Winzig.