DEVELOPMENT

AHL Map Entities
Here is a brief write up of the entities available in AHL. Some entites may be marked as *broken*. These will hopefully be fixed in future releases.

Items Ammo and Weapons
Here is a list of the currently available item, ammon and wepaon entites available for maps. They are pretty much self explanatory.

weapon_anaconda

weapon_beretta

weapon_akimbob - Akimbo Berettas

weapon_colt

weapon_akimcolt - Akimbo Colt 1911

weapon_de50

weapon_saa

weapon_akimsaa - Akimbo SAAs

ammo_pistol - Generic ammo, includes ammo for all pistols

weapon_hkmp5

ammo_mp5clip

weapon_50cal

ammo_50cal

ammo_sniper

weapon_m4

ammo_m4

weapon_msg90

ammo_msg90

ammo_766mm

weapon_handcannon

weapon_ithaca

ammo_shells

ammo_buckshot

weapon_knife

weapon_frag

item_vest

item_laser

item_stealth

item_silencer

item_bandolier

item_flashlight

item_nightvision

On Targetnames
HL automatically checks for certain targets when a client dies, connects etc.

game_playerleave - fired by a player when they disconnectfrom the server

game_playerjoin - fired when a player when they first JOINS a server

game_playerspawn - fired each time the player spawns

game_playerdie - fired by the player that died

game_playerkill - fired by the player that killed another player (fire for just killing... even if you killed a team mate)

game_playerscore - fired when you GET a frag (In teamplay, this means killing a non-team member)

game_roundtimeover - fire when the time runs out (saves usings some multimanager)

All Map Entities
If you wish your map to work well for both Teamplay, goals AND deathmatch, make sure you add the flag 'noreset' with the bitflag '2' to every entity that should be removed when the game is not suppose to use the goals (Like in deathmatch). This goes for any added special spawn points, trigger_hurt's, items etc.

noreset - bit flag

1 - entity does not reset when the round does

2 - entity should be removed in DM or when 'mp_goalsoff' is set

4 - entity should be removed in TEAMPLAY

8 - entity should be removed if Rounds of off (DM or old style teamplay)

Game Team Master
teamname <string>
Use this instead of teamindex, because its easier to keep track of.(define the teams first using info_team ent's)

targetname <target_source>

Game Team Set
teamname <string>
Same as teamindex, but by name (Only use if you define the teams first using info_team ent's)

targetname <target_source>
Set master to this team instead

Game Score
As soon as you add one of these, normal teamplay takes a back seat to what ever you have planned. Normally, the round will end if only one team remains alive. Once this entity is added, that is no longer the case. If you add one of these, you must also add some game_text to say who won etc. The DLL will no longer do that for you. The game score entity will only awards points if the game is actually in progress. If you intend to end the round with a 'game_roundend', award points at the same time.

teamname <string>

points <integer>
If the integer value is a negative, then points will be deducted.

Game Roundend
Ends the round in a gametype that supports round (Action Teamplay only really). You can set a delay before firing, allowing you to award points etc first. This entity won't fire if the game isn't actually in progress.

wait <0.1+>
Delay before the round will try to restart. Must be greater then 0 obviously

Game Player Die
About the only real use of this is to check for the death of a team.
REMEMBER : set the targetname to 'game_playerdie'
Spawnflags :

SF_WHOLE_TEAM 0 - Fires when a team member is killed.

SF_WHOLE_TEAM 1 - Fires when whole team (including subteams) is dead.

SF_WHOLE_TEAM 2 - Fires when whole subteam team is dead.

Variables :

master <targetname> - Master of team. (See Game Team Master).

targetname "game_playerdie"

target <targetname> - The entity to trigger.

Info Team
These allow you to set the number of teams, a teams name, model. Weapon choices are currently non functional.
It is important to remember one thing : the order you put them in.

eg.

The first info_team you add will become the team at index 1
The second info_team you add will become the team at index 2
The third to team index3 etc

Action Half-Life only supports 4 teams at the moment.
So remember to only add four, eh?

Variables :

name <max 16 chars> - Name of team

model <max 16 chars> - Model for that team.

max_members <0-?> - Maximum members allowed in team.

min_members <0-?> - Minimum members allowed in team.

respawn <0-?> - Wait this many seconds before being able to respawn.

lives <-1+> - Number of times someone on this team can die.

-1 : Unlimited lives. Team members can respawn as much as they want

1+ : Each team member can respawn this many times before remaining dead

The weaponlist and itemlist is unfortunately not functioning for this release.

weaponlist <bitvalue> - The weapon choices this team has

-1 : Anyone joining this team is considered a civie.

They start with no weapons and can't pick em' up either.

-2 : Anyone joining this team will simply have no weapons at the start.

Might be useful for maps with added items or assigning items with

game_player_equip's

Weapon Choice BitValues :

Beretta 1
Anaconda 2
MP5k 4
50cal Sniper 8
HandCannon 16
Shotgun 32
Knives 64
2nd Pistol 128
M4 Assault Rifle 256
Semi-Auto Sniper 512

itemlist <bitvalue> - The item choices this team has

Item Choice BitValues :

Vest 1
Laser Sight 2
StealthSlippers 4
Silencer 8
Bandolier 16
FlashLight 32
Night Vision 64
No Grenade 128

Func Breakable
If it doesn't have a target or targetname, it will respawn in DM.
In teamplay, it will respawn no matter what when the round resets.

Trigger Once
Will reset when the round does.

Func doors, trains, buttons etc
Will reset when the round does.

Trigger Camera
The existing halflife Trigger Camera entity has one addition.

SF_CAMERA_ALL_PLAYERS - spawnflag 8

Makes every single player suddenly view through this camera.

All Items (Weapons/Ammo/Special Items)
Items in AHL share these following attributes:

wait <-0.0+> - respawn after this many seconds

eg. wait 0.1 : near instant respawn

eg. wait -30 : item still exists in the game and will respawn after 30 seconds
repsawn after -1 * this many seconds, and remain in Action Teamplay

master <target_source> - just like triggers etc. Player must match the neccessary master fields to be able to pick it up. Allows team only items etc

Game Player Message
If a player fires this ent, it will make them send a say_team and/or radio message to everyone on their team. It's mainly here to help out newbies/streamline games a bit more. Used by the Terrorist Leader in Action Rail.

message <string> - say_team message to send

radio <soundfiles> - radio message to send

NOTE : if no (message) is given, no one will know who sent the message

Target Key
target_key is similar to the Quake2 ent 'trigger_key'. When triggered, it searches the activator for a specified game_item. If they have at least one of the items, it will fire

Variables :

itemname <string> - name of the item to search for. Must be the same as what ever game_item you want it to refer too.

Spawnflags :

SF_KEEP_ITEM - 1

Normally, firing a target_key removes the item. If KEEP_ITEM is set, it won't. This is useful for making security doors and such, where you may want players to be able to re-use the item.

Game Item *Not Working this release*
game_item Used for adding retrievable goals into a map. When a player touches a game_item, it checks to see if that player is already carrying an item by the same name. If not, it gives them one.

Variables :
model <path/model> - set the items model (defaults to "models/flag.mdl")

pmodel <path/model> - set to the model that will attach to the player for (use with SF_WEAPON)

target <target_source> - fired when normal and touched (as apposed to dropped and touched)

skin <path/skin> - set the skin

targetname <string> - Set so that the item can be USED.

Using the item toggles it state, depending on how it was used. Most things simply reset it (make it respawn).

0+ - Item starts ON, and touchable - initial state
-1 - Item starts OFF, hidden and untouchable

itemname <string> - name of the item.

Two game_item's CAN have the same itemname (for the purpose of restricting items). The way that game_item's are kept track of doesn't matter if one or more have the same name.

teamname <string> - add a teamname to say who 'owns' the item. This is for adding a 'reset' capability if the item is dropped and touched by a player on this team. It is also used to fire a different target if a player on this team touches it while it is still available.

ally_target <teamname> - goes with 'teamname'.

If a player on the team touches the item, but does not pick it up, this target will be fired.

return_target <target_source> - goes with 'teamname'.

If a player on teamindex team touches a DROPPED version of the item, but does not pick it up, this target will be fired & the original item reset.

drop_target <target_source>

If someone carrying the item drops it (through death etc), this target will be fired

respawn

0 - When dropped, respawn immediately
1+ - When dropped, wait this many seconds and respawn
-1 - When picked up, remain normal (don't hide & become untouchable)

respawn_target <target_source>

If the item respawns on its own (after being dropped), this target will be fired

Spawnflags :

SF_NULL 1

Exists only for reference. If targetted, will 'give' itself to the target. Use it to give ppl security cards etc

SF_FOLLOW 2

Copies itself to the person who touched. That copy then follows that person around (Like the flags in TFC CTF etc)

SF_WEAPON 4

Becomes the players active weapon and looks like they are carrying it. Attacking with the item drops it.
NOTE : Player cannot use another weapon while holding such an item.

Game Text
Game text displays text upon the screen.

Variables:

teamname <teamname> - CURRENTLY NOT WORKING FOR THIS RELEASE. TEXT IS SEEN BY ALL PLAYERS.

Send a message to everyone on this team

%p - if in the 'message' part, will be substituted with the activators name instead. eg. "%p has taken the flag!" would come out as "Mr_Grim has taken the flag!"

%t - if in the 'message' part, will be substituted with the activators teams name instead. eg. "The %t's flag has been taken!" would come out as "The SAS's flag has been taken!"

Monster Victim
Spawns an NPC who just sits there and can be shot/used. Even if killed/gibbed, it will reset when the round does.

Variables :

deadtarget <target_source>

When killed by a player, will fire this target

target <target_source>

If 'used' by a player, fires this target

model <path/model>

Use this model. Defaults to Neo if not set.

health <integer> - set health (default : 100)

angle <0-359> - sets the NPC facing this angle.

master <game team master name>

Set to a game_team_master to make them team specific. When an NPC is mastered, the team that shares the same master with the NPC cannot damage or kill the NPC. This is in the interests of stopping 'game spoilers'.

Monster Hostage *Not working this release*
Exactly the same as a monster_victim when dealing with variables etc, except when a monster_hostage is used, it will follow the user around. They will also move out of the way when you walk into them. If a player uses them again, they will stop following them. For the hostages to get around better, a .wps files should be made for the level.

Trigger Hostage *Not working this release*
Just like any other basic trigger (needs a brush model), except this one can only be touched by monster_hostages. When they are touched, it fires its target based of the person leading the hostage, and then it removes the hostage from the game (makes non-solid & invisible etc)

Game Player Equip
This will override weapon/item selection menu for the player using it.(It also disables random item spawn in DeathMatch) In a teamgame, it won't (use info_team's item/weaponlist for that). For instance : if you wanted everyone to start with just a knife, you could add a game_player_equip with 'weapon_knife 1' set. When a player spawned, it would simply spawn them in with one knife, and not bring up the weapon selection menu.

Creating Overviews
The way to make overview files doesnt work completely like it says anymore. Valve changed things slightly.

The new way is more fiddly, in order to prevent script kiddies hacking the code I think...

Heres how it works, (basically)

Start a half-life DEDICATED server (dedicated is important!!). Make sure bots are turned off

Start a hltv proxy, and point it at your server.

On the server, change level to the level you want to make an overview for (changelevel ahl_xx)

Then start a half-life game, and connect to the proxy, using the hltv slot (its the one that has no text on it at the moment).

Type developer 1

Change views a couple of times, this should get rid of the "help text borders". Keep going until you are come to a big green grid.

Type dev_overview 1

This should put you in the top down mode, if all you get is a green screen, you probably didnt switch to overview mode before typing dev_overview, type dev_overview 0, and cycle through the different views again and it should work.

You can move the map around with keys FORWARD,BACKWARD, RIGHT & LEFT. Maps will be automatically rotated to fit optimally onto the screen. If they are rotated, FORWARD and RIGHT are swapped, etc. Use the keys ATTACK and ATTACK2 to change the zoom. With zmin and zmax you can choose which parts of the map should be drawn. Only polygons between these two values are shown. This can be used to cut off ceilings or other unwanted objects. Origin is your viewpoint projected into the map. The map will be rotated around this point if you move the mouse in overview mode. Zmin can be changed with UP & DOWN and zmax with JUMP & DUCK. If you think you've found the correct values for the new map, simply make a screenshot and remember all of the values, which are needed for the overview description file (to avoid console text on the screenshot set developer 0).

Align your map to fit the screen. Note down all of the numbers to do with the position of the camera

Grab screenshots of the map. If necessary, move up and down to grab screen shots of the different levels of the map, then use photoshop to merge them together (use layers and the eraser tool) or add neat effects (eg, no-credit could be re-done to look like a sketch of the map, as seen in the petrol station, or other maps could be changed to look like security blue-prints or something).

Save it as the mapname.tga, and place it into the overviews directory. Take one of the map.txt files from one of the other mods (DMC, TFC, HL), rename it to your maps name.txt, open it, and fill out the values with the ones you noted down earlier...

cut and paste again...

Next, you have to create an overview description file that will be parsed by the client DLL to get the map image filename and the correct view parameters. This file must be in the overviews\ directory and must have the same name as the current BSP file, but with TXT as its extension. Here is an example (overviews\de_vegas.txt):

// overview description file for de_vegas.bsp

global

{

ZOOM 1.63

ORIGIN 1903 -1283 -1088

ROTATED 0

}

layer

{

IMAGE "overviews/de_vegas.tga"

HEIGHT -1088

}

The global section describes zoom, the origin point the map is rotated around, and a boolean to indicate if the map image is rotated or not. The layer section describes the map image filename and at which height (z-axis) the map should be shown. The overview mode uses the some coordinate space as the game world and all icons are drawn at the same position as their corresponding entities

Then when you join a hltv server, you should find when you switch to a map view there is a picture of the map, rather than a green grid.

I have to say, the biggest problem I've found is that the entities on the map sometimes didn't relate to the position of the entities in the world. The worst one for this is hondos maps (I tried doing a no-credit one. It seems ok now..), because the secrets make the maps much larger than the overviews are. I think the best bet is to make sure the HEIGHT field has the correct value for whatever you used as zmax. Then watch the game with some bots or something to see if you have the origin set up correctly, if not, adjust the origin, and reload the level. (this is where running the game in a window comes in useful, add -window 640 480 to your commandline)