func_mortar_field

From Sven Co-op
Jump to navigation Jump to search
func_mortar_field
Type

brush

Status

supported

 


This entity serves as a spawnzone for mortars, which cause a sound effect, shortly followed by an explosion on the ground straight below where they were spawned. This entity can be hooked up to momentary_rot_buttons or func_rot_buttons to do aimed mortar strikes.

Keyvalues

Spread Radius : m_flSpread

Mortars spreading radius, bombs will spawn randomly within specified radius.

Repeat Count : m_iCount

Amount of mortars to spawn each airstrike call.

Targeting : m_fControl

Controls area of airstrike with the following options.

  • Random makes mortars spawn randomly within the volume of func_mortar_field.
  • Activator option simply force mortars to strike at '!activator' (activator of the script) e.g. when player pushed a button which fires func_mortar_field, and the 'Activator' option is selected, the mortars spawns above the player. Note that bombs will be called at '!activator' location during the moment of firing func_mortar_field, which means the '!activator' has time to escape from within the airstrike area. Another thing about 'Activator' option is that '!activator' location is not important- the bombs will strike '!activator' even if it's outside the volume of the func_mortar_field- the location, placement and size of this entity does not matter.
  • Table variant can be seen in Half Life single player campaign- Gordon controls the airstrike area by two momentary button, first button controls X position of mortarts, and the second button controls its Y position. This option enables "X Controller" and "Y Controller" keyvalues. When func_mortar_field is triggered, the entity picks percentage of X and Y position (from left/top to right/bottom) of func_rot_buttons hooked to it, and converts those to X and Y sizes of this entity volume, e.g. when the left/right momentary button (X Controller) is in the far left side, and the top/bottom momentary button (Y Controlled) is in the center of the whole movement distance, the airstrike will be called at 0% X and 50% Y position of func_mortar_field.

X Controller : m_iszXController

The name of momentary_rot_button or func_rot_button to control X coordinates of mortar spawnpoint. Requires 'Table' value in "Targeting" key (see above).

Y Controller : m_iszYController

The name of momentary_rot_button or func_rot_button to control Y coordinates of mortar spawnpoint. Requires 'Table' value in "Targeting" key (see above).