Dod bomb target: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
 
(47 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{wrongtitle|title=dod_bomb_target}}
{{CD|CDODBombTarget|base=CBaseAnimating|file1=dod/dod_bombtarget.h}}
{{This is a|model entity|name=dod_bomb_target|game=Day of Defeat: Source}}
This entity represents a detonation location within the map. It is shown visually by TNT. A player must be carrying a {{ent|weapon_basebomb}} to plant here.
{{note|When the bomb explodes, the entity changes to its "disabled" state and [[EF_NODRAW]] is added to hide the model.}}


==Entity Description==
== Entity statistics ==
[[File:Detonation_bomb.PNG|thumb|right|250px|Picture of the dod_bomb_target Entity in Hammer.]]
<div style="display:flex;flex-wrap:wrap;gap:15px">
{| class="wikitable"
|+ <span style="color:white">Models</span>
|-
! Entity state !! Model
|-
| Able to be planted || {{file|models/weapons/w_tnt_red|mdl}}
|-
| Unable to be planted || {{file|models/weapons/w_tnt_grey|mdl}}
|-
| Armed || {{file|models/weapons/w_tnt|mdl}}
|-
|}


This entity is represented visually by a grey or yellow outline of [[weapon_basebomb]]. In turn it represents a detonation location within the map.
{| class="wikitable"
|+ <span style="color:white">Distances<br>(must have [[LOS]])</span>
|-
! Action !! Radius
|-
| Planting || 80qu
|-
| Defusing || 96qu
|-
|}


==Keyvalues==
{| class="wikitable"
 
|+ <span style="color:white">Timings</span>
* '''targetname'''
|-
: <string> Name given to the entity
! Situation !! Time
 
|-
* '''bombing_team'''
| Bomb timer || 20 sec
: <choices> The team that will be placing a bom at this point
:{|
!| Value || Description
|-
|-
| 1 || Both
| Time to plant || 2 sec
|-
|-
| 2 || Allies
| Time to defuse || 3 sec
|-
|-
| 3 || Axis
|}
|}
</div>


* '''target_control_point'''
== Keyvalues ==
: <string> Control point which the entity captures, or helps capture, when detonated
{{studio rendering note|model, sequence, playbackrate}}
 
{{KV Targetname}}
* '''StartDisabled'''
{{KV StartDisabled}}
: <choices> Weather or not the entity starts disabled
{{KV Angles}}
:{|
{{KV|Target Control Point|intn=target_control_point|target_destination|[[dod_control_point|Control point]] which the entity captures, or helps capture, when detonated. Can be omitted if this is not tied to an objective.}}
{{KV|Bombing Team|intn=bombing_team|integer choices|The team that will be placing a bomb at this point. Defaults to Allies if absent or set to 0.}}
:{| class=standard-table
!| Value || Description
!| Value || Description
|-
|-
| 0 || No
| 2 || Allies
|-
|-
| 1 || Yes
| 3 || Axis
|}
|}
:{{tip|To create a team-agnostic bomb target, place two {{mono|dod_bomb_target}}s in the same location with the same {{mono|angles}}. Send the {{mono|Disable}} input to the opposite team's bomb target via {{mono|OnBombPlanted}}, and send the {{mono|Enable}} input to the opposite team's bomb target via {{mono|OnBombDefused}}.<br>Since {{file|w_tnt_red|mdl}} and {{file|w_tnt_grey|mdl}} both use {{cmd|$additive}}, no [[z-fighting]] will occur, and the unplaced bomb will look yellowish (placeable) for both teams.}}
{{KV|Add To Timer <nowiki>(sec)</nowiki>|intn=add_timer_seconds|int|Adds selected time to the [[dod_round_timer|map timer]] if successfully bombed.}}


* '''angles'''
== Inputs ==
: <integer> the angle at which the entity is seen (Pitch Yaw Roll)
{{I EnableDisable}}
 
==Inputs ==
* '''Enable'''
: Enables the entity
 
* '''Disable'''
: Disables the entity
 
==Outputs==
* '''OnBombExploded'''
: Sent when the bomb explodes
 
* '''OnBombPlanted'''
: Sent when a bomb is planted
 
* '''OnBombDefused'''
: Sent when a bomb is defused
 
* '''OnKillPlanter'''
: Sent when a player who is planting a bomb dies
 
* '''OnKillDefuser'''
: Sent when a player who is defusing a bomb dies
 
==See Also==
 
* [[List_of_DoD:S_entities|List of DoD:S entities]]


[[Category:Day of Defeat: Source Entities]]
== Outputs ==
[[Category:Entities]]
{{note|The [[!activator]] and [[!caller]] for following outputs is this entity.}}
[[Category:Level Design]]
{{O|OnBombExploded|Fired when the bomb explodes.|}}
{{O|OnBombPlanted|Fired when a bomb is planted.|}}
{{O|OnBombDefused|Fired when a bomb is defused.|}}
{{O|OnBombTargetActivated|Fired when this entity receives the {{mono|Enable}} input.}}
{{O|OnBombTargetDeactivated|Fired when this entity receives the {{mono|Disable}} input.}}

Latest revision as of 15:56, 3 June 2025

C++ Class hierarchy
CDODBombTarget
CBaseAnimating
CBaseEntity
C++ dod/dod_bombtarget.h

dod_bomb_target is a model entity available in Day of Defeat: Source Day of Defeat: Source. This entity represents a detonation location within the map. It is shown visually by TNT. A player must be carrying a weapon_basebomb to plant here.

Note.pngNote:When the bomb explodes, the entity changes to its "disabled" state and EF_NODRAW is added to hide the model.

Entity statistics

Picture of the dod_bomb_target Entity in Hammer.
Models
Entity state Model
Able to be planted 🖿models/weapons/w_tnt_red.mdl
Unable to be planted 🖿models/weapons/w_tnt_grey.mdl
Armed 🖿models/weapons/w_tnt.mdl
Distances
(must have LOS)
Action Radius
Planting 80qu
Defusing 96qu
Timings
Situation Time
Bomb timer 20 sec
Time to plant 2 sec
Time to defuse 3 sec

Keyvalues

Note.pngNote: See Model entity/Generic Keyvalues, Inputs and Outputs for keyvalues and inputs that affect model rendering.
Note that the following keyvalues are unavailable due to being overridden by game code:
model, sequence, playbackrate
It may still be possible to use their associated inputs or AddOutput them.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Target Control Point (target_control_point) <targetname>
Control point which the entity captures, or helps capture, when detonated. Can be omitted if this is not tied to an objective.
Bombing Team (bombing_team) <integer choices>
The team that will be placing a bomb at this point. Defaults to Allies if absent or set to 0.
Value Description
2 Allies
3 Axis
Tip.pngTip:To create a team-agnostic bomb target, place two dod_bomb_targets in the same location with the same angles. Send the Disable input to the opposite team's bomb target via OnBombPlanted, and send the Enable input to the opposite team's bomb target via OnBombDefused.
Since 🖿w_tnt_red.mdl and 🖿w_tnt_grey.mdl both use $additive, no z-fighting will occur, and the unplaced bomb will look yellowish (placeable) for both teams.
Add To Timer (sec) (add_timer_seconds) <integer>
Adds selected time to the map timer if successfully bombed.

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

Note.pngNote:The !activator and !caller for following outputs is this entity.
OnBombExploded
Fired when the bomb explodes.
OnBombPlanted
Fired when a bomb is planted.
OnBombDefused
Fired when a bomb is defused.
OnBombTargetActivated
Fired when this entity receives the Enable input.
OnBombTargetDeactivated
Fired when this entity receives the Disable input.