Tutorials

quake2 -target_secret, target_goal, worldspawn


These have got to be three of the easiest entities to use, (hence one of the easiest tutorials to write, heh) but they add immensely to the completeness of a level.

target_secret

When a map is loaded, Quake II counts up all of the target_secret entites in the map. When one of them is triggered, it adds 1 to the total secrets found. That's it.

Anything that can trigger another event can trigger a target_secret. Since the entity is removed as it's used, you can even use a trigger_multiple, in which case it will trigger the secret on the first firing. Simply add a "target" key and value (let's use "sec1") to the triggering event, and a "targetname" and value ("sec1") to the target_secret. You're done.

You can also add a "message" key to a target_secret, and the message value will be displayed in the center of the screen upon discovery of the secret.

target_goal

The target_goal is used in exactly the same way as the target secret. However, since you will most likely have set up a target_help to tell the player just what the goal is, you will most likely want to set up a new one at or near the target_goal. You don't want people wandering around with nothing to do.

worldspawn

If you've compiled and run a map, you've already used worldspawn. There are, however, a few keys that you can add to it, that change the environment throughout the map.

sky

This key changes the environment map for the level. In order to use it, add the "sky" key, and give it the value of the sky you wish to use. The environment maps included in Quake II are unit1_ through unit9_ and space1.

skyaxis

If you would like to have a rotating sky, like in the final boss level, you'll need to define an axis for the sky to rotate around. Simply add a key of "skyaxis" and give it a vector using three numbers (vectors are the same values that define projectile paths, and line of sight for monsters.) If you don't quite know vectors, just play around with the numbers until you find one you like. Don't use 0 0 0 however, as this will give you a hall of mirrors effect. (doesn't define a vector, so it doesn't draw the sky) 0 0 1 will give a flat rotation.

skyrotate

This controls the speed of rotation for the sky. Add the "skyrotate" key, and give it a value in degrees per second.

sounds

This is the CD track that will play during the level. Add the "sounds" key, and give it a track number.

gravity

This controls the gravity level. Default is 800. The gravity in the Comm Sattelite level is set at 100.

message

This is the text that will appear at the console when you begin the level, and in the computer. Add a key of "message" and give it a value of whatever the title of the level is. Anything more than 32 characters, and you'll get a warning (Com_sprintf: overflow...) at the beginning of the level. It doesn't do anything, the warning is just there.

Three very easy to use entities, but they definitely add a 'polished' feel to a level.

-GrrandMaMa

You can download the [example .map] here. Also if you have any problems or need some help please post to the discussion board.

Return to Tutorials Page...







All content © 1998 by Shane 'Fishman' Sherman. This particular tutorial was created by GrrandMaMa and belongs to him. Quake and Quake2 are trademarks of id software. All rights reserved.