hostage_entity

From Valve Developer Community
(Redirected from Info hostage spawn)
Jump to: navigation, search
English (en)Translate (Translate)
Creating a Hostage Rescue Map

hostage_entity is a point entity available in Counter-Strike: Source Counter-Strike: Source and Counter-Strike: Global Offensive Counter-Strike: Global Offensive.

A hostage_entity in Hammer.
A GIF with the four hostage models in CS:GO. Their bbox is 16x16x64.
Note.pngNote:Counter-Strike: Global Offensive Identical to info_hostage_spawn.
In VScript, when trying to find hostages using Entities.FindByClassname(handle, classname), remember to look for both classnames. No matter how it was obtained, any hostage's GetClassname() function will return "hostage_entity".

Entity description

Counter-Strike: Source This is a spawn point for a hostage NPC.

  • By +useing it, a Counter-Terrorist player can tell the hostage to follow them or to stop doing so.
  • Hostage NPCs will not use nav areas with the NO HOSTAGES attribute which can be toggled with nav_no_hostages.
  • There is no limit to the amount of hostages in a map, but maps tend to have 4.

Counter-Strike: Global Offensive This is a potential spawn point for a liftable hostage.

  • By default, 2 of these entities (if existent) will be chosen to actually spawn a hostage, respecting exclusion groups, see below.
  • CTs can pick one hostage up by +useing it for 4 seconds; 1 second if they have a rescue kit, 5 seconds in CS:GO Co-op Strike Co-op Strike and CS:GO Guardian Guardian.
  • Hostage carriers move slower and hear the hostage's breathing. When touching a func_hostage_rescue, this is reverted and the CTs win the round.
Tip.pngTip:In VScript, if hostage is the handle of a hostage_entity, then the VScript function hostage.IsBeingCarried() returns true if this hostage is being carried.
PlacementTip.gifPlacement Tip:Keep this entity away from things that it could get stuck in when spawning.

Related ConVars

Some ConVars are deprecated in Counter-Strike: Global Offensive since hostages have been updated to no longer run themselves.

ConVars in both games Counter-Strike: SourceCounter-Strike: Global Offensive
ConVar Default Value Description
hostage_debug 0 Shows hostage AI debug information. Counter-Strike: Global Offensive If non-zero, Terrorists can pick hostages up with no pickup delay.
Icon-Bug.pngBug:The carried hostage's model and collisions remains and it keeps teleporting inside the Terrorist carrier, making them stuck.  [todo tested in?]
mp_hostagepenalty Counter-Strike: Source 5 Counter-Strike: Global Offensive 10 Terrorists are kicked for killing this many hostages and are warned if they need only one more kill: "If you kill one more hostage, you will be removed from the server."
Counter-Strike: Global Offensive The ConVar is inaccessible? Killing hostages requires mp_hostage_takedamage 1.
sv_pushaway_hostage_force 20000 How hard the hostage is pushed away from physics objects (falls off with inverse square of distance). Deprecated in Counter-Strike: Global Offensive.
sv_pushaway_max_hostage_force 1000 Maximum of how hard the hostage is pushed away from physics objects. Deprecated in Counter-Strike: Global Offensive.
ConVars only in Counter-Strike: Global Offensive CS:GO
ConVar Default
Value
Description
cs_hostage_near_rescue_music_distance 2000 Non-functional?
hostage_is_silent 0 If non-zero, hostages won't play any code driven response rules lines, i.e. speaking and hurt sounds. The breathing while being carried remains in both cases.
mp_hostages_max 2 Maximum number of hostages to spawn. The number of hostages cannot exceed the number of hostage entities on the map.
mp_hostages_rescuetime 1 Additional minutes added to round time if a hostage is reached by a CT for the first time.
mp_hostages_run_speed_modifier 1
Obsolete-notext.pngDeprecated:Slow down hostages by setting this to < 1.0.
mp_hostages_spawn_farthest 0 When enabled will consistently force the farthest hostages to spawn.
Icon-Bug.pngBug:Inconsistent?  [todo tested in?]
mp_hostages_spawn_force_positions "" Comma separated list of zero based hostage_entity indices to force spawn positions, e.g. "0,2" or "1,6". Invalid indices are ignored.
Tip.pngTip:Overrides exclusion groups and mp_hostages_spawn_same_every_round.
mp_hostages_spawn_force_positions_xyz "" Comma separated list of xyz locations to force spawn positions, e.g. "x1 y1 z1,x2 y2 z2".
mp_hostages_spawn_same_every_round 1
  • 0: spawn hostages randomly every round,
  • 1: same spawns for entire match.
mp_hostages_takedamage 0 Whether or not hostages can be hurt and killed.
Warning.pngWarning:Killing a hostage that a bot is about to pick up will crash the game! Killing a hostage while a player is freeing it makes them stuck, as if they kept +useing the hostage. Terrorists killing 10 hostages are kicked, even with mp_autokick 0. Overall, there is certain undefined behavior going on.
mp_only_cts_rescue_hostages 1 Determines if only CTs can escort hostages or any player.
Note.pngNote:Terrorists bringing a hostage to a func_hostage_rescue win the round for the CTs. To simulate a Terrorist rescuing a hostage, fire OnRescueZoneTouch to the player after avoiding a CT win, e.g. by winning the round for Ts with game_round_end or by ignoring win conditions with mp_ignore_round_win_conditions 1.
mp_roundtime_hostage 0 How many minutes each round of Hostage Rescue takes. If 0 then use mp_roundtime instead.
sv_cs_player_speed_has_hostage 200 The maximum velocity that hostage carriers can reach by running.
Note.pngNote:The 8 cash_ ConVars and 3 contributionscore_ ConVars concerning hostages have been omitted.

KeyValues

Hostage Model (HostageType) <integer> Obsolete
Deprecated.
Not used; hostage models are chosen randomly by the game. Leftover from Counter-Strike and Counter-Strike: Condition Zero, where custom models could be used.
Hostage Spawn Random Factor (HostageSpawnRandomFactor) <integer> (only in Counter-Strike: Global Offensive)
Allows to increase probability of this hostage being picked during random spawn selection process, essentially considering this spawn point specified number of times.
Hostage Spawn Exclusion Group 1 (HostageSpawnExclusionGroup1) to Hostage Spawn Exclusion Group 30 (HostageSpawnExclusionGroup30) <choices> (only in Counter-Strike: Global Offensive)
Hostages sharing any exclusion group will never spawn together, unless overridden with mp_hostages_spawn_force_positions or mp_hostages_spawn_force_positions_xyz.
0 n/a
1 Do not spawn together

Inputs

OnRescueZoneTouch
Rescues the hostage, making it fade out. This can win the round for CTs.

Outputs

OnHostageBeginGrab  (only in Counter-Strike: Global Offensive)
Fired when a player starts +useing this hostage successfully.
OnFirstPickedUp  (only in Counter-Strike: Global Offensive)
Fired when this hostage has been picked up for the first time.
OnDroppedNotRescued  (only in Counter-Strike: Global Offensive)
Fired when the carrier of this hostage dies.
OnRescued  (only in Counter-Strike: Global Offensive)
Fired when a player carrying this hostage touches a func_hostage_rescue.