Team Specific Entities

These entities are composed architecture, such as doors and laser, and point entites, like backpacks and armour, which will only affect one team, or several but not all teams.


I will start by covering what you need to do to make a door work for one team only.  To create this effect, you first create the door in the same way as normal.  Making it work for just one team is then a simple procedure of changing a key value, called 'Team'.  Set the value of this key to the team you want to be able to use the door.

Now, to make it display the message to any other team which tries to use the door, like 'This door does not work for your team', you need to add another key, called 'else_goal'.  The value of this key is the number of an info_tfgoal.  When someone tries to use this door, the engine will make a check to see if they are on the correct team.  If they are, then it will open the door and allow them to pass through.  However, if they aren't on the correct team, then it activates the info_tfgoal.  To make the message display, we must now set some options in the info_tfgoal.  The first of these is 'goal_no', displayed in Worldcraft as 'Goal #' with smart edit turned on.  Set this to the same value as the 'else_goal' in the door properties.  This value must be a number, it cannot contain any letters.  The other value which must be set is 'Message to player', or just 'message' with smart edit off.  This should be set to '#2fort_door' which will display the same sentence as used in 2fort when the door doesn't work.  You can set this value to anything you like, eg 'You can't get in here'.  Just in case you place the info_tfgoal anywhere where a player may be able to touch it, you should set it's 'Goal Activation' key to 0, to prevent people from activating it by touching it.  That's it!

You can use the same process to make a trigger_multiple work for one team only.  Later on, in the turrets section, you will see how to make it work for all teams, except one, should you need to.


The next thing to look at is the laser.  To create the laser affect, you use an env_beam, but you will need to look elsewhere for a tutorial on this, as I am only covering TF entities.  To make it kill people, you must make a trigger_hurt in the same place as the laser, usually a doorway or tunnel which you want to keep enemies out of.  You then, as before, have to specify which team you want it to effect.  Note that with the door, you specified the team you wanted to be able to use the door, with this, you have to specify the team you want the laser to kill.  Once you have created your trigger_hurt, set it's damage to something like 5000, which will definitely kill anyone who touches it.  You then specify the team to kill by setting the 'team' key to the colour of the team you want to kill.  Also, set the Damage Type to Energy_beam, just for added effect.  That's all there is to creating beams, just remember that the beams are usually coloured to the colour of the team which can safely pass through it, which aids the players.


Turrets are often placed in respawning areas, to keep enemies out of them to stop them spamming the areas, preventing you from emerging.  They are simple to make, as they are a standard Half-Life entity, all we do is add an extra key to specify which team you want them to shoot at, rather than at everyone.
First of all, create a suitable mount for the gun, most however are just position in the ceiling, but you may feel a small base is required to make it fit in.  Once you have done this, add a monster_turret and set it's orientation, depending if you want it to drop out of the ceiling, or pop up out of the floor.  You then need to change the 'team' key to the colour of the team you want it to shoot at.  Also, make sure that the auto-start is set on.  This is ok if you only have two teams, but if you have more than two teams, you may want the turrets to shoot at more than one team.  To achieve this, simply change the key called 'goal_activation' to '4 - NOT' which means it will shoot at everyone EXCEPT the team specified in the 'team' key.

Next Page...

Back to tutorials...

© 2000-2001 TFX-Soft, all rights reserved