[ Monsters | Triggers | Trigger_Count | Switches | Trigger_Push ]
[ Trigger_Relay | Trigger_Setskill | Moving Monsters ]

2.5.1 Items:

All of the following items are set with the Entities Tool:

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)

For cells, rockets, shells, and spikes, there are spawnflags to make the boxes large, which gives more ammo per box. Also, you can set their availablity in Easy, Normal, Hard, and DM.

The item_health spawnflags have two options: Rotten (15hp) or Megahealth (100hp). It defaults to 25 hp. Like ammo, you can make them not available in certain skill levels.

Envirosuit, Quad damage, invulnerability, invisibility, the armor, and the keys have no special spawnflags, but their availability can be set for certain skill levels.

When you place a sigil (rune), you must edit the spawflags to pick what episode this sigil represents. The generic item_sigil entity doesn't default to an episode 1 rune. Any rune will do on a single map, unless you use more than one in that level. Then you have to select a different episode rune.


2.5.2 Monsters:

Have you been wondering how you can get events to trigger when a monster dies, like the teleporters that open in E1M2 when you kill the demon? Well, it's not too difficult. When you attach a target tag to a monster, the monster's death will trigger the event. I believe (not tested) that if other monsters have a targetname tag the same as a monster with the target tag, the target event will only occur when all monsters with a matching targetname tag are dead. The monster with the target tag need not have the targetname tag.

How to use trigger_count:

The trigger_count class is quite an interesting trigger. You know of the area in E1M1 where you have to hit the three switches to open the door? Well, that's done using a trigger_counter. Each of the buttons you hit has its target property set so it points to a trigger_counter. The trigger_counter has its count tag set to three.

Each time a switch is hit, the trigger_counter's count property will decrement by one. When it reaches zero, it will open the door. Each button can only be triggered once as it has a wait of -1.

To create a door that requires hitting three buttons, first, create the door with the targetname door1. Second, create a brush out of reach from the player and convert it to trigger_counter. It has a number of spawnflags:

Set the flags for the door however way you want. Under the Message spawnflag, enter something like 'Press All 3 Buttons' or something appropriate. For the trigger_counter, give it the targetname of door2 and a target of door1. Then create all three buttons and target them at door2, ie, the counter, not the door itself. By doing this, when each button is hit, it targets the counter, which subtracts by one. When the counter hits -1, it activates its target, the door.


2.5.3 Triggers:

Triggers are used as either func_ or trigger_ entities. trigger_ entities are invisible in the compiled map but show up in the 3D view of your editor, while func_ entities are visible.

A button/switch (attaches to brush):

Buttons are used for a variety of things: opening doors/gates, lowering platforms, turning on lights, etc. You will use the target and targetname with this brush. It has a number of flags.

Properties of Buttons:

The behavior of buttons can be altered in many ways. By default, buttons are activated by pressing them (moving near them). Buttons can be made shootable by giving them a health tag. Unless you want to have to shoot the button tons of times, set the health tag to "1". If you want to have the button flash when you shoot it, you must include all of the button animation textures in the level. You can just put them on brushes outside the level.

Buttons in practice

Here's a simple button: Make a brush using the +0button texture, placing it where you want it to be. Make sure it isn't too high so the player can't reach it. Make sure the brush is big enough for the texture to cover and adjust it to fit neatly. That done, place the brush along the wall with the brush sticking half of its thickness out of the wall. Don't stick but button too far into the wall, because when you hit it, it'll disappear into the wall. I prefer to make my buttons thin for this reason.

Convert it to a func_button entity. Connect the button to a door (I'll assume you've already made it) with with the target/targetname pairing. There's your button-opened door.

Use health for shootable buttons. In Quake, id often used the +0shoot and +1butn textures. In the Health field, set the health to 1. That way, any shot taken at it will activate it.

Angle is the direction, again determined by the overhead view, that the button will move when depressed. Make sure that the angle is set so the button goes BACK into the wall when depressed.

The sound and speed are up to you, since you might want to make it suitable for the atmosphere of your level.

Walk-over trigger (attaches to brush):

There's four kinds of walk-over triggers: trigger_once, trigger_multiple, trigger_onlyregistered, and trigger_secret. Walk-over triggers are set off when you walk over an area. Use any texture you want, it'll be invisible. Then set its 'target' to whatever you want: doors opening (func_door, teleporting monsters (trigger_teleport), or a message. Just the trigger function can print messages as the player walks over. You don't need to target anything.

Use trigger_multiple if you want something that constantly works. For example, in the start map in Quake, a trigger multiple tells you as you walk down the hall what the skill level is. If you stop and stand in the area covered by the trigger_multiple, the message will keep repeating itself. trigger_once activates once and it's dead after that.

The triggers use the "killtarget" flag so you can make walls disappear, etc. They have four sounds - Secret Sound, Beep Beep, Large Switch, and a text message. I'm not sure why you need this when there's also a Message field that prints a message as you hit the trigger.

Here's a very complex trigger I once used in my map Fireworld. You approached a rickety bridge with a hole in it. Halfway across, knights materialized on both sides, which really was nasty if you're not ready for it. I used a trigger_once on the ground, which targetted a trigger teleport that housed the two knights in an invisible room outside the map. The teleporter was big enough to engulf them, which is what you must do. Then, using two info_teleport_destination's, one for each monster, they were on either side of the player. Mind you, this was not easy to get set up. :-)


2.5.4 Teleporting Monsters:

Unlike in Doom-Engine games, you can precisely teleport monsters into new locations in Quake. They use the info_teleport_destination tag, same as you would use for making a player teleport.

First, create an area outside of the map for the monsters to wait in. Just make a simple cube. Give this area a trigger_teleport tag and make sure your monster is within this area. Assign a targetname tag to the teleporter. Next, add a info_teleport_destination entity where you want the monster to appear. Give it the same name that you assigned to the teleporter's targetname.

Next, you must create a trigger trigger_teleport with the targetname that matches the trigger_teleport name. When this trigger is activated, the monster in the room will teleport to the info_teleport_destination. Make sure that there is only one monster per room and one room per info_teleport_destination. Otherwise, when the teleport is triggered, all the monsters will telefrag each other (like what happens in E1M7 when you win).

Makes a monster jump when it reaches a brush:

Ever see a monster run up to the edge of a ledge and jump down? Yet another advance in the Quake engine. You have to create a brush that covers a floor area at the edge of a ledge, then convert it to a trigger_monsterjump entity. That way, when the monster approaches the edge of a high perch, it will automatically jump off.

All of the attributes are set in the properties of the trigger_monsterjump, not the monster at all. You set the forward velocity and how high. Most of the maps I've seen have Ogres jumping down, I've yet to see a bionic jump way up, although that could be amusing. The angle is determined by the overhead compass, same as determining the direction a monster faces. You need to tinker with these settings, as it's hard to say what angle and velocity to use.

2.5.5 Assorted Triggers:

trigger_push

This entity is used for wind tunnels. It has several spawnflags:

For wind tunnels with multiple turns, simply put another trigger_push at the joint of the two tunnels, where one ends and another begins, and have that successive pusher send the character on in their new direction.

Trigger_relay

A trigger_relay entity is simply a 'this trigger in, that trigger out' device. It is very handy for controlling multiple events in your level. Insert a trigger_relay in your level in an area where a player can't accidentally 'touch' it. I'm pretty sure you could set the trigger off accidentally by touching it. The entity does not need to be attached to a brush.

The values that you can set for trigger_relay are:

So what is the trigger_relay good for? I have made a small example of one possible use. In this example, I have a room with a door, a func_button, and a light. Let's say that I want to have the door open normally with a trigger_multiple (shown) anytime the player walks up to it, but if the player presses the func_button, I want the door to open AND the light to come on. Since the door can have only one 'targetname' value, it would be impossible to achieve this effect without the trigger_relay. Set up the entities as follows:

func_door:
	targetname: DOOR

trigger_multiple:
	target: DOOR

trigger_relay:
	targetname: DOORLITE
	target: DOOR

func_button:
	target: DOORLITE
	delay before reset: STAYS PRESSED
light:
	targetname: DOORLITE
	flag 'initially dark' set on

(Obviously, I am leaving out some of the other settings, but I am only explaining the triggering process in this example, and not how to set every key on every entity!)

I know this may look a bit confusing, but here is how this particular room would work with the settings I have given above:

If the player activates the trigger_multiple in front of the door, it will trigger DOOR entities - there is only one of those, the func_door itself.

If the player activates the func_button, it will trigger entities named DOORLITE. There are 2 entities with that targetname, the light, and the trigger_multiple. When the light is triggered, it will turn on; when the trigger_relay is triggered, it will activate its 'target' value, which is set to DOOR, and the func_door will open, therefore we have achieved the desired effect of the door opening and the light coming on.


Setting difficulty level (attaches to brush):

I must admit this confuses me, because if you set a brush in the teleporter to teleport the player, where do you set the skill level? The trigger_setskill entity attaches to a brush, as does the teleporter. If someone knows how to do this, please let me know
(Note from Zaphod: Check the Worldcraft Specs Items page for info on how to do this in Worldcraft, I will update this section once I find out how it's done in BSP!)


Portions Copyright ©1996-97 Niklata and Thomas Winzig.