Submitted by
Miniwood on Sat, 2003-11-08 00:36.
Quake 2 Target Entities
target_actor
- Not implemented. The code is incomplete. (The code for target_actor has been completed and enhanced in the Lazarus Mod
target_blaster
- The target_blaster entity is simply blaster fire that can be triggered. What I mean by blaster fire is like when you shoot the your blaster(1st weapon) or your hyperblaster. I didn't really notice many times in the id levels where these were used. The only level I remember seeing this entity is the first secret level. Anyhow, it's very simple and there are numerous uses for it.
The first thing you need to do is create the gun or whatever that is going to shoot the blaster fire. You don't really need to make it if you don't want to if though.
Next thing you do is place the target_blaster entity where you want the blaster fire to originate from.
There are a few key value pairs and spawnflags that you can set to make the target_blaster act in different ways. The key value pairs are angle, damage, and speed. angle determines the direction the target_blaster will fire. damage is of course the amount of damage the blast will take off when it hits another entity. speed is how fast the blaster fire will travel.
target_changelevel
- The target_crosslevel_* entities are used to trigger unit-wide events. Press a button (or series of buttons) in one level of a unit, and a door opens in another. They aren't all that hard to use, if you're comfortable with triggers and targets, but before we get started, there are a few things you should know about the target_crosslevel_trigger, and target_crosslevel_target entities:
1.) The target_crosslevel_ entities work by setting one or more of eight spawnflags, which are retained throughout a unit, which simply means you only get eight cross-level events per unit.
2.) Make sure you have a unit exit at the end of the last level of the unit, as not resetting the spawnflags results in fewer available spawnflags for the next unit. A unit exit is just a target_changelevel with an asterisk (*) in front of the actual map$startpoint keyvalue.
Here are a few examples:
To go to e1u2 of the id levels (skipping the cinematic,) you would have a target_changelevel with the key 'map', which would have the keyvalue '*bunk1$start'
To go to e1u2 (including the cinematic,) you would have a target_changelevel with the key 'map', which would have the keyvalue 'eou1_.cin+*bunk1$start'
To go to e1u1 you would have 'map'='*base1' (because the start for base1 doesn't have a targetname)
3.) The crosslevel spawnflags are read when Q2 initializes the map, which means
any crosslevel triggers will not have any effect until a level change. With all of that in mind, let's start.
First off, let's create a room with an
info_player_start. Decide where you want your exit to be. Make a brush with the 'trig' texture at the area you've chosen as the exit, and make it into a trigger. It doesn't matter if it's multiple or once, because we'll be using it to exit anyway. Make a
target_changelevel, and give it a key of '
map' with a keyvalue of '
tcex2$from1'. In this case, the '
tcex2' is the next example map we'll be making; '
$' means we'll be going to a specific
info_player_start in tcex2; and '
from1' will be the targetname of that
info_player_start.
Now create another
info_player_start, and put it near,
but not touching, the exit (preferably facing away from it, but that's up to you.) Give it a targetname of '
from2'. This is where you'll spawn if you come back to this map.
The next thing you need to do is set something up to trigger your
target_crosslevel_trigger. This can be a button, item pickup, or anything that can trigger another event. Give it a target (we'll use
tc1 for this example.) Now, create your
target_crosslevel_trigger, and give it a matching targetname (again,
tc1.) Set the flag for
trigger1 in the entity window for your editor. Now, when you trigger it, the
trigger1 spawnflag will be set for the next map.
Save the map as '
tcex1.map'
Now we need another level to go to. Create a room similar to the last, but with two exits this time. Set the keys for one
target_changelevel to '
map'='
tcex1$from2' and the other to '
map'='*
base1'. Place an
info_player_start near the exit that goes back to
tcex1, and give it a targetname of '
from1'.
Now, create a
target_crosslevel_target and set the
trigger1 flag. Give it a '
target' of '
boom', and a '
delay' of '
2'. Make a
func_explosive, and give it a '
targetname 'of '
boom'.
Compile and run the map. If everything worked properly (cross your fingers, it helps) then you should be able to trigger in the first level, and then go into the second level, wait a second, and *
boom*. Just to make sure, try not to trigger the
target_crosslevel_trigger before you go into the second map.
For further experimentation, you can set up more than one
target_crosslevel_trigger, each with a different trigger flag checked (1, 2, 3...), and then set up one target_crosslevel_target with those flags checked.
Only after you've triggered all events will the target be fired.
In the example maps, the first
target_changelevel_trigger is a button, and the second, Carmack's head (I just
had to throw it in.) When you come to the third level, a wall explodes, and you exit to the intro cinematic, followed by base1. I hope you find this helpful, as it helped me to make it.
-GrrandMaMa You can download the
example map here. Also if you have any problems or need some help please post to the
RUST Forums.
target_character
- See func_clock
target_crosslevel_target
- See target_changelevel
target_crosslevel_trigger
- See target_changelevel
target_earthquake
What this does is......create an earthquake!! Pretty difficult huh? There are a few options and other rules that you should know about though
The target_earthquake does NOT start on and must be triggered into working. There are 2 key value pairs that you can set. They are speed and count. Speed is the magnitude of the quake. Count is the length of time the quake will last. Some other things to know is that the earthquake does not give off damage and it is not viewed in the level so size of the entity does not matter.
target_explosion
What a target_explosion does is when triggered creates a visual explosion that can be set to do any amount of damage. There are 2 key value pairs that you can set. Dmg and delay. Dmg is the amount of damage the explosion will cause and delay is the amount of time after triggered that the explosion will take place.
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.
target_help
- target_help is the entity that makes those messages appear on your computer. It also makes the computer blink. They used it in quake2 to tell you about your primary and secondary missions on each level.
This entity must be triggered so therefore it must have a targetname. Set the key value pair message to whatever you want it to print. If you want it to come on right when the level is started then use a trigger_always. To specify primary or secondary objectives just set the spawnflag help1 and the message will appear in the primary objective space otherwise it will appear in the secondary. If you are having problems with the message being too long for the space provided on the computer then simple put a \n where you want the line to end.
target_laser
- This is another somewhat easy entity to use. i'm sure if you've played through quake2 then you've seen many examples of lasers and the cool effects that id used with the lasers. The cool effects like the moving spiraling lasers are a bit more difficult to implement but i'll try to show you how.
First thing you need to do is decide where you want the laser and what you want to use it for. The laser can either be
triggered or
start on. If you want it to be turned on then you need to
give the target_laser a targetname and make some kind of trigger to start the laser. If you want the laser to start on the just
set the start_on spawnflag. The laser can either shoot in a direction or shoot at a target. If you want the laser to shoot in a direction other then anything horizontal or up and down then your going to have to have it shoot at a target. This target must be an
info_notnull.
There are 5 colors you can choose from:
red, green, blue, yellow, and orange. Just set the spawnflag of the color you want. You can also have larger lasers by setting the
spawnflag big. If you want the laser to take off more damage then set the key value pair
dmg n where
n is the amount of damage the laser takes off.
Moving lasers work just like the example above except the
target_laser must be targeted to a func_train. And of course the func_train must be connected to multiple path_corners so it will move. The laser will follow the func_train.
There are some very cool things you can use lasers for. You can use them for doors, for traps, etc. On the
example map I have made examples of 4 kinds of uses of a target_laser. One as a door opened with a button, another using info_notnulls to create diagonal lasers, another with a func_timer to make a laser that blinks off and on, and one using a func_train to make a moving laser. If you have any other questions on a target_laser then please post them on the
RUST Forums
target_lightramp
- The target_lightramp entity is another easy entity to use. What it does is makes a light fade in or fade out. I actually don't really remember seeing this used in quake2 but it is such a sutle effect that I just probably didn't notice.
The first thing you need to do is do create the light that you want to fade in or fade out. Give it a light value. This light value will be the maximum the brightness of the light will be when it is all the way faded in.
The second thing you need to do is decide if you want the light to start dark and become bright or start bright and become dark. If you want to the light to start dark then you need to set the spawnflag start_off on the light entity. If you want the light to start light and become dark then you need to have the start_off spawnflag off. You must also give the light a targetname. Lets just give it a targetname of light. targetname light.
Next you need to make the actual target_lightramp entity. It doesn't matter where it goes because it will not be visible. The first thing you need to do to the target_lightramp is to give it a target to the light. target light. While your at do also give the target_lightramp a targetname. Lets give it a targetname of ramp. This is because the lightramp doesnt start on and must be triggered by another entity, but we will get to that in just a minute. There are two key value pairs that you can set for the target_lightramp. They are speed and message. Speed determines how many seconds it will take for the light to fade in or fade out. So if you have speed set to 20 then the light will gradually fade in or fade out within 20 seconds. The message key value pair must have 2 letters and only 2 letters. These 2 letters determine the starting light level and the ending light level. The range of these letters is a to z. So if you want the light to fade in from dark to light then the message would be az. message az. if you want it to fade out from light to dark them the message would be za. message za. Just think of it as A getting brighter and brighter as it goes towards z, with z being the brightest.
There is also one spawnflag called toggle for the target_lightramp. If this is on and you have the target_lightramp triggered with a func_button or a trigger_multiple then if you trigger it again with the button or trigger_multiple it will turn on and turn off as many times as you trigger it. So in other words you can use it more then once.(turn the light on then turn it off)
The last thing you need to do is create the entity that will turn on the target_lightramp. This can be any kind of trigger you want. It all depends on the effect that you are looking for. You could use a func_button if you wanted it to be like a light switch that you could turn off and on. You could use a trigger_once, trigger_multiple, trigger_always, etc. You could even use a func_timer which would make the light fade in and fade out multiple times in row. So make the trigger entity that you wish to use and set the target to the target_lightramp. For this example it would be target=ramp.
That's all there is to a target_lightramp. Pretty cool little entity which can provide you with some very interesting effects. In the example map I included a target_lightramp that is triggered with a func_button. So the lightramp can be turned on or off. Any other questions please post them in the RUST Forums
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_spawner
- A target_spawner can be used for a number of things. What it actually does is makes an item of your choice appear at the location of the target_spawner. Any single item can be spawned. Even weapons and health. id didn't ever use the target_spawner for things like that though. They mainly used it to spawn gibs, insane people, and creatures. This entity is pretty simple once you figure out a few things.
There are two entities that must be used to get the target_spawner to work properly. There must be the actual target_spawner and some kind of entity that will actually trigger the target_spawner into working like a func_timer or a trigger_once.
Now for an example:
Lets make a trap that will drop soldiers into a pool of lava.
The first thing we need to make is the tube coming from the ceiling that will drop the soldiers into the lava and the actual pool of lava. Now we need to put a target_spawner inside of the tube coming from the ceiling. Now we need to specify what the target_spawner will spawn. This is the part that most people get stuck on. Instead of actually targeting a misc_insane entity you must set the target of the target_spawner to the name of the entity that you want to spawn. So therefore in this example we would set target=misc_insane.
Next you need to create a entity that will start the target_spawner. Lets give the target_spawner a targetname of lavapool. targetname=lavapool. Now let's use a func_timer to actually spawn the misc_insane. Set the target of the func_timer to the target_spawner. target=lavapool. Also be sure that you set the turn_on spawnflag for the func_timer. Unless you want to make it so you can turn it on with another trigger like a func_button. If you were to do this then you would just give the func_timer a targetname and target it with the func_button.
There are some key value pairs that you can set for a target_spawner to get some different effects. They are speed and angle. Speed is the speed that the item will come out of the target_spawner. If speed is not set then the item will be dropped. Angle is the direction that the item will be spawned and if speed is set then it is the direction the item will be thrown.
One of the most common uses of a target_spawner is to spawn gibs and those insane soliders. There are 3 types of gibs. misc_gib_arm, misc_gib_leg, and misc_gib_head. The names are pretty much self explanatory. Another entity that is commonly spawned on a few of the id levels is the misc_insane entity which is an insane solider.
There are many uses for a target_spawner. A trigger on one side of the level will spawn a creature on the other side of the level to surprise the player when he/she returns. You can even spawn health, weapons, and armor. Don't know what the use of that would be but I'm sure there are a few good ideas you guys can come up with.
As you can see target_spawner is a pretty simple entity to use. Just remember that you must have some sort of trigger to set off the target_spawner. Anything can be used...such as a trigger_once, func_timer, trigger_multiple, etc. It all depends on how you plan on using the target_spawner.
To understand the target_spawner more you can download the example map. Anymore questions then please post to the RUST Forums
target_speaker
- The target_speaker entity is another one that will be used VERY often by a map designer and should be known very well. What it does is spawns all those crazy sounds you here in quake2. Like the humming of a generator, breaking of glass, water flowing, ships flying overhead, etc. I will attempt to show you how to use this entity...hopefully.
Creating the target_speaker -
A target_speaker should be placed where you want the sound to originate from. By default a target_speaker will not start on and will have to be triggered by another entity such as a trigger_once, trigger_multiple, func_button, or whatever you want the sound to be triggered by. If you want a window to set off the sound then you would create the func_explosive that would be the breaking window and add a target key and set it to the the target_speaker. There is a way to make the target_speaker to start on that I will explain in the spawnflags section.
Key Value Pairs -
Noise
Noise is the name and path of the actual sound that will be played. The trick to it, if you want to call it a trick, is that you must specify the directory path and the name of the sound. Here is a list of all the sounds that you can use and their directory paths. A common thought is that you can only use the sounds in the world/ directory but this is simply not true. You can use ANY sound at ANY time. You will soon find out though that the sounds in the world directory will be used much more often. So for an example if we want the target_speaker to produce a pump sound then we would set noise=world/bigpump.wav.
Things to remember:
Every target_speaker MUST have a noise key. Case does not matter. xian.wav and XIAN.WAV will both work. attenuation attenuation is the distance the sound will travel before fading out. There are 4 different levels of attenuation:
-1 : No fade off, the whole level will hear the sound 1 : Normal fighting sounds. This is also the default attenuation for normal sounds. 2 : idle sound level. 3 : ambient sound level. Default attenuation for target_speaker entities that have the spawnflag looped-on set. a value of 0 for attenuation will default to 1.
volumeVolume is pretty self explanatory. Volume levels can be values of 0.0 to 1.0. 1.0 being the loudest. If volume is left blank then the default volume is set to 1. A volume of .1 will barely be audible. If there are multiple target_speaker entities with the same sound playing at the same time then the volume will increase beyond normal but excessive target_speakers will do nothing beyond a certain point.
Spawnflags -
looped-onWhen looped-on is set then the sound will start on when the level is started and stay on until triggered. Thus the sound will loop over and over again until triggered and turned off. Sounds that are looped-on
always have an attenuation of 3 and a volume of 1 and can
not be changed.
looped-offLooped-off is the opposite of looped-on naturally. The sound will start off and then when trigger will start and stay on. As with a looped_on sound they always will have an attenuation of 3 and a volume of 1 and can
not be changed.
reliablereliable is used when you have a very important sound that player must hear, like for crucial voiceovers. It makes the sound that is marked as reliable to override all the other sounds that are playing at the same time.
Uses of the Target_Speaker - There are virtually unlimited uses of the target_speaker entity. Of course you are going to want to use a lot of the world/ sounds with breaking glass, moving trains, computers humming, etc. But there are also uses of the non world/ sounds. Like some of the monster sounds at random areas to create a freaky feel of the level. There is an example of this on the
example map.
Well anyways if you still don't understand please post your questions to the
RUST Forums
target_splash
- first thing you need to do is open your favorite editor and make a small room with nothing in it. Decide where you want the splash of particles and create a trigger_splash entity.
Now you need to give the trigger_splash a targetname. For this example lets give the entity a target_name of splash1
Now we must specify what kind of spark you want. There are 6 different kinds. 1) sparks
2) blue water
3) brown water
4) slime
5) lava
6) blood
To set this use the keyname sounds and set it to whichever you want from above. For this example we are going to set sounds=4 for slime.
The next step is to set the number of sparks you want. For this example we are going to make it 2. so set count=2 for the trigger_splash entity.
We arent done yet though. To get the sparks to actually appear and work right you must create a func_timer. This is what actually spawns the sparks. It doesnt matter where you make this entity so just make it anywhere on the level and set the target of this func_timer to the trigger_splash. So in this example we would set target=splash1. If you want the sparks to start on then be sure to set the spawnflag start_on. Below is my some shots from my example using multiple trigger_splashes to make the acid look like it is bubbling, etc. first 2 shots are from the editor(bsp), last one is from the game. You can download the map file here.
target_string
- See func_clock
target_temp_entity
- The target_temp_entity is one of the strangest entities available to level designers for quake2 but very very cool. In the game it was only used once in the level boss1. What it does is spawns some sort of sprite. You have 3 of them to choose from(that i know of). First is a green electrical type fire that gives off dynamic green light. Second is a pixel explosion that looks similar to fireworks. Third one is a badass cloud of particles that shoots up and then encaves on itself. My descriptions don't do them justice though, download the example map and check them out for yourself. I'll show you how you can use these cool effects in your levels below.
Creating the target_temp_entity
- First you have to decide where you want the sprite to spawn at. Place the target_temp_entity at this location.
Since it is a target_ entity it must be triggered by something else. So therefore you must trigger it with an entity such as a trigger_once, trigger_multiple, trigger_relay, trigger_always, func_button, func_timer etc.
Key Value Pairs -
styleThere is only one key value pair that can be set for the target_temp_entity. It's called style. What is does is specifies the sprite that will be displayed. These values MUST range from 17,18,20-22 or there will be an error and the game will crash. I am not sure if there are any other values other then these, these were the only ones I found to work.
Another thing you should know is that style 22 is the only one used in the id levels and is the only one that has a sound that is played when it is triggered. Style 20 and 21 MUST have a target_speaker used to get sound(if you want sound). Here are some screenshots of 3 of the different styles:
style 20
style 21
style 22 17 is the rocket explosion,
18 is the grenade explosion.(thanks obama) Uses of the target_temp_entity -
This entities uses are visual and just for looks but very very cool. You could have big generators that give off the electrical cloud of style 22. You could have a trap that would set off a target_temp_entity under the feet of the player and disintegrate him. There are numerous cool and unique uses for this entity that all of you guys/gals can up with. There is an example of the 3 different styles on the
example map.
if you still don't understand please post your questions to the RUST Forums