Hostages & Bots

Tutorial collection, comprehensive listings on main site.

Hostages & Bots

Postby Tutorial on Mon Mar 28, 2005 10:36 pm

category
Counter-Strike: Source

description
A few hints on creating a CS style map, with a section creating bot waypoints as well as hostage nodes.

keywords
cs, source, counter, strike, counter-strike, bots, bot, hostage, hostages.

OK I'm assuming you have an area/map in mind for this and know roughly where you want to put everything, here's all the entities you need to have a fully working hostage rescue map, and limited information on the nav editor, waypoints and creating bots.

At the time of writing i'm still a little hazy on the waypoints and nav editor so any corrections please let me know. I'll add a more detailed tutorial once i've worked it out myself.

Note that all entities should be placed just above but not touching the ground unless otherwise stated.

For the number of counter-terrorist and terrorist start points it depends on the size of the map and how many players you want it to be able to cope with but the default is 32 players so suggested you place 16 of each.

1. Counter-Terrorist Start
Create a new entity called info_player_counterterrorist and place it where you want the ct's to start. Create one of these for each counter-terrorist start point. Don't place them too close together and don't place them in a narrow corridor or anywhere where an afk player is going to block others trying to get past!

2. Counter-Terrorist Buyzone
Select the texture tool and browse and filter on "trigger". Select the trigger texture (not the trigger relay texture). Create a brush that encompasses all the counter-terrorist start points but doesn’t cut any walls. If this isn't possible then you can create multiple brushes for multiple buyzones. With the entity selected press "Ctrl-T" to tie the brush to an entity and select entity type func_buyzone. Select your entity and go to properties. Select a name for your buyzone (eg. ctbuyzone1) and then select counterterrorist from the team number drop down.

3. Hostage Rescue Area
Select the texture tool and browse and filter on "trigger". Select the trigger texture (not the trigger relay texture). Create a brush that encompasses the area you want to be the hostage rescue area. Your brush should be just above the ground and set it so that it's height is around head height for a hostage just to make sure. With the entity selected press "Ctrl-T" to tie the brush to an entity and select entity type func_hostage_rescue. If you want there's decals for hostage rescue area which you can put on the floor.

4. Terrorist Start
As above for counter-terrorist but use info_player_terrorist entity

5. Terrorist Buyzone
As above for counter-terrorist but select terrorist from team number drop down.

6. Hostages
Now all you need is some hostages to rescue. For this create an entity and select hostage_entity.

7. Creating Navigation File
The final step you need to do is to create a navigation file (.nav) for your map. This is a file used for creating waypoints and information for hostages and bots. This will be created in your map directory alongside your map. Eg. cs_mymap.bsp will have a nav file called cs_mymap.nav. Ensure that when you distribute or run your map that this file exists in the directory.

To create your .nav file:
Compile and run your map. If you try to use a hostage you'll find that they don't follow you, this is because the .nav file doesn't exist. In Advanced Options enable the developer console. Press ~ to access the console. Type "sv_cheats 1" which switches on cheats. Type "navedit 1" which enables navigation editor. This can be used for manually adding and changing waypoints in the map. Type "nav_generate". This'll take a few minutes or longer depending on the size of the map. The application will automatically build the .nav file for you and should re-start the map automatically. If not then re-start your map.

Now when you try to use a hostage it should follow you though they may not be particularly clever about it.

8. Bugs in The Nav File
If you find that counter-strike crashes on you while building the .nav file or opening your map then check the following:
1. Find your map directory and look for the .nav file. It may be corrupt. If it's 1kb in size then delete it. If not then back it up (rename it something else) and the next time it generates it should hopefuly be ok.
2. If it's still a problem then check your map and make sure that all your info_nodes (see later) and other hints for hostages are in sensible places (not stuck in the ground or high in the air) and check you've no leaks in your map.

9. Play Testing Your Map With Bots
Now that you have your map running and hostages following you about you'll want to play test it. To do this run your map then type "sv_cheats 0" to turn off cheats in case someone else joins your map. Type "bot_add" which will create a bot for you to play against. Keep adding more bots as required. Another useful command is "bot_difficulty 0/1/2/3" which sets the skill level of the bots (3 being the toughest). Also "bot_kick" and "bot_kill" are useful for getting rid of bots. For testing sniping points use "bot_snipers_only"

Things to look out for are hostages who don’t follow you, areas where they become stuck, etc. For bots the nav_edit editor can be used to add hints, where they can jump, where they can climb ladders, etc.

10. Hostage Waypoints
In addition to the nav editor you can use the entity info_node to create waypoints for your hostages. This is useful if you find that they're running on ahead of you and getting stuck. These should be placed in line of sight of each other so the hostages can walk from node to node. There are other types of nodes for various situations as with the nav editor.

Miscreat
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby smeerkat on Sun Apr 03, 2005 6:14 pm

How far apart should each info_node be?
über dumpling.
User avatar
smeerkat
Regular
Regular
 
Joined: Sun Apr 03, 2005 5:36 pm
Location: Babylon 4

Postby Grim Reaper on Mon May 02, 2005 8:20 pm

and this hostage rescue decal is where?
Grim Reaper
May Contain Skills
May Contain Skills
 
Joined: Mon May 02, 2005 9:40 am
Location: Its this place, with air, and buildings, and there is lots of concrete...

Postby Mass on Mon May 02, 2005 9:42 pm

It is called decals/hrpoint

When I have put it down on the ground, I don't seem to be able to rotate it. I have tried to rotate as usual but it won't move

Any ideas guys?

Thanks
Mass
Dumpling
Dumpling
 
Joined: Mon May 02, 2005 9:40 pm

Postby slayera on Mon May 02, 2005 11:03 pm

How far apart should each info_node be?


256 units.

When I have put it down on the ground, I don't seem to be able to rotate it. I have tried to rotate as usual but it won't move


Try as an overlay instead of a decal. If you're stuck on using as a decal, you will need to exact it and make copies of every angle you want and recompile.
Image


"When one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." -Robert Pirsig
User avatar
slayera
Veteran
Veteran
 
Joined: Wed Dec 08, 2004 3:15 am
Location: Near the world's only super volcano.

Postby Mass on Tue May 03, 2005 12:57 pm

Well, if I do an overlay, it shows up in a mirror image so the letters are the wrong way around.

As for decals, how do you "exact" it? I only want to turn it 180 degrees from it's usual position so it shouldn't be too hard

Thanks for your help
Mass
Dumpling
Dumpling
 
Joined: Mon May 02, 2005 9:40 pm

Postby Unarmed on Sat Jul 23, 2005 12:24 pm

Alt + Enter to bring up properties. Play around with them and you'll find out.
Unarmed
Dumpling
Dumpling
 
Joined: Wed Jun 22, 2005 4:27 pm

Postby falco on Sat Aug 06, 2005 1:31 pm

i made a room with 4 hostages and 1 info node in the center. when i tell them to follow they approach but don't leave the room and when i leave the room they run chaotically into walls

wtf?
User avatar
falco
Regular
Regular
 
Joined: Thu Mar 31, 2005 12:58 pm
Location: pimp club

Postby YokaI on Sat Aug 06, 2005 1:32 pm

falco wrote:i made a room with 4 hostages and 1 info node in the center. when i tell them to follow they approach but don't leave the room and when i leave the room they run chaotically into walls

wtf?


You need to place info_nodes on the door ways or wherever you think is necisary. Think ground nodes as checkpoints.

also: youll need more than one info_node.
YokaI
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 03, 2004 12:38 am

Postby falco on Sun Aug 07, 2005 9:00 am

so they don't go where i go but to the node that is closest to me?

EDIT
ok i fixed this one i just had to make the room walkable and make some extra area connections in the nav
User avatar
falco
Regular
Regular
 
Joined: Thu Mar 31, 2005 12:58 pm
Location: pimp club

Postby Nexix on Tue Jul 31, 2007 5:23 pm

It would be good if it you wrote how the different nodes is used to...if you know what I means. 8)
User avatar
Nexix
Member
Member
 
Joined: Mon Jul 30, 2007 9:26 am

Postby MayheMsg on Thu Aug 09, 2007 5:57 pm

There is one thing i have run into with hosties in a room not wanting to follow.

Be sure to go into nav_edit and check to be sure your room is connected to the outside hall/areas. If not add a nav area using (nav_begin_area and nav_end_area), then be sure to connect them to the existing nav areas. You will need to nav_mark them then use nav_connect. Big thing about this be sure to connect them so they are connected as a two way path. reference here if what i have said is too vague. http://developer.valvesoftware.com/wiki/Navigation_Meshes
Image
User avatar
MayheMsg
Regular
Regular
 
Joined: Mon May 01, 2006 5:55 pm

Postby braindead76 on Fri Aug 10, 2007 3:28 am

I'm having trouble getting bots & hostages to climb ladders, I followed the instructions for them on the valve wiki, trying both nav_build_ladder and start/end area commands and have made sure that they have 2 way connections to adjacent areas but to no avail. Anyone know what I'm doing wrong?
User avatar
braindead76
Dumpling
Dumpling
 
Joined: Fri Aug 10, 2007 3:21 am

Postby MayheMsg on Fri Aug 10, 2007 4:23 pm

I have not tested this yet, but i am going to.

using "info_node_climb" on ladders should in theory get the bots and hosties to climb the ladder. To be honest i do not know if this will work after all i have never seen a map where bots or hosties climb ladders. I am wondering if it is just not in their abilities.

I am about to try it in my map. if i get to it before you i will let you know...
Image
User avatar
MayheMsg
Regular
Regular
 
Joined: Mon May 01, 2006 5:55 pm

Postby TorQueMoD on Sun Dec 09, 2007 10:35 pm

Bots and Hostages climb ladders in cs_militia.

Also, when using decals, if the decal isn't facing the right direction, or is mirrored, change the rotation or direction of the texture its applied to.

For example, if you're placing the hostage rescue point decal on the ground and your ground texture is concrete_floor_01, select the concrete_floor_01 texture and adjust its texture properties. If the decal is mirrored, change the X or Y number to a negative. X -256 Y -128. If its rotated the wrong way, rotate the concrete_floor_01 texture appropriately. Decals get their placement info from the texture below it.
-TorQue[MoD]
Environment and Game designer
http://www.torquemod.com
User avatar
TorQueMoD
Been Here A While
Been Here A While
 
Joined: Wed Oct 19, 2005 7:15 am
Location: Vancouver, Canada
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users