Func bomb target

From Valve Developer Community
Revision as of 21:21, 12 August 2021 by Darnias (talk | contribs) (disable works just fine for disabling bomb sites)
Jump to navigation Jump to search
English (en)Translate (Translate)

Template:Base brush multi

C++ In code, it is represented by theCBombTargetclass, defined in thefunc_bomb_target.cppfile.

Entity Description

The existence of this entity makes a map a bomb defusal scenario. It marks where C4 entities can be planted.

  • Players must touch the volume of any func_bomb_target in order to plant a C4 entity.
  • Counter-Strike: Global Offensive As soon as a C4 entity is planted inside this entity's volume or as soon as it receives the input BombPlanted, this entity will no longer allow players to plant a C4 entity inside it.
  • If a C4 entity is planted inside this entity's volume, this entity fires the outputs BombPlanted, BombDefused and/or BombExplode for this specific C4 entity.
  • The radar will automatically label a func_bomb_target as either A or B, depending on which one was created first.
    • If there are more than two of these entities, only two of them will be labelled with A and B.


Note.pngNote: This entity is part of S_PreserveEnts. Killing this entity removes it for all subsequent rounds!
Counter-Strike: Global Offensive To "disable" it for a round, use Disable input.

Keyvalues

Heist Mode bomb Target (heistbomb) ([todo internal name (i)]) <boolean>
Tells the bomb target that it's designed for the Heist game mode.
Bomb Mount Target ([todo internal name (i)]) <targetname>
Optionally, have the bomb be forced to a specific position and orientation after being planted. The position and angles are determined by the ones of a specified info_target.
BaseTrigger
Filter Name (filtername) <filter>
A filter entity to test potential activators against.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Inputs

BombExplode  !FGD
Pretend the bomb exploded; fires the BombExplode output.
BombDefused  !FGD
Pretend the bomb was defused; fires the BombDefused output.
BombPlanted  !FGD
Pretend the bomb was planted; fires the BombPlanted output and removes this entity's volume from the planting zones.
BaseTrigger
Toggle
Toggles this trigger between enabled and disabled states.
Enable
Enable trigger
Disable
Disable trigger
TouchTest  (in all games since Source 2007)
Triggers either the OnTouching or OnNotTouching outputs for whether anything is touching this entity.
Icon-Bug.pngBug:Sleeping prop_physics will never fire "OnTouching". Also applies to entities using prop_physics as base.  (tested in: Half-Life 2)
StartTouch  (in all games since Source 2007) !FGD
Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
EndTouch  (in all games since Source 2007) !FGD
Behave as if !caller had just exited the trigger volume.
DisableAndEndTouch  (only in Source 2013 MultiplayerTeam Fortress 2 branch)
Disables this trigger and calls EndTouch on all currently-touching entities.


Outputs

BombExplode
Fires when the bomb explodes.
BombDefused
Fires when the bomb is defused.
Icon-Bug.pngBug: Is not fired by normal gameplay, only with the BombDefused input.  [todo tested in ?]
BombPlanted
Fires when the bomb is planted.
BaseTrigger
OnStartTouch
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger.
OnStartTouchAll
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger, and no other entities are touching it. If there are any other entities touching the trigger when a new one begins to touch, only OnStartTouch will fire.
OnEndTouch
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity stops touching this trigger.
Note.pngNote:Will also fire for entities touching it when trigger is disabled via Disable input
Warning.pngWarning:This includes entities which are deleted while inside the trigger. In this case !activator will be invalid.
Warning.pngWarning:OnEndTouch can fire before OnStartTouch under certain circumstances[How?] where both are fired on the same tick and each have the same delay.
Note.pngFix:Add a slight delay to OnEndTouch.
OnEndTouchAll
!activator = entity that caused this output
!caller = this entity
Fired when all valid entities stop touching this trigger.
OnTouching  (in all games since Source 2007)
!activator = !caller = this entity
Fired if something is currently touching this trigger when TouchTest is fired.
OnNotTouching  (in all games since Source 2007)
!activator = !caller = this entity
Fired if nothing is currently touching this trigger when TouchTest is fired.