op4mortar

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

point

Status

supported

 


A big static mortar which has the mechanical means to turn left/right and change its pitch in order to acquire its target. Can be set to aim and fire automatically or be controllable by players through func_op4mortarcontroller. The op4mortar is not solid; you might want to wrap it in a clip brush. It also is indestructible and thus not targeted by its enemies. It shows no HUD information. Its maximum rotation speed is 40 degrees per second for each, pitch and yaw.

1 Keyvalues

Pitch Yaw Roll : angles

Rotation of the op4mortar. What matters here is the yaw-value. The yaw-value plus 180 defines the default firing direction But in the editor, it's the same direction when the model is facing.

Velocity : mortar_velocity

Speed of the explosive projectile shot by the mortar in units per second. A mortar with high velocity needs to aim higher at the sky than mortars with lower velocity to hit close targets. The mortar won't try using a pitch of less than 45 degrees.  A firing angle of 45 degrees provides the greatest distance, under the condition, that there is no air drag and the height  at which the object is fired is the same as the height at which the object hits the ground.

Horiz MIN : h_min

Maximum rotation to the left from the given yaw-angle.

Horiz MAX : h_max

Maximum rotation to the right from the given yaw-angle.

Min Target Dist : mindist

Minimum distance projectile can travel.

Max Target Dist : maxdist

Maximum distance projectile can travel.

Delay between shots : firedelay

The delay between shots, in seconds. Minimum accepted by the game is one second, to avoid spamming.

Is player ally : is_player_ally

If this op4mortar is set to fire automatically, this defines whether it will handle players as enemies or not. Furthermore, this defines whether players can be damaged by the projectile's explosion in the first place. The firing player can always get hurt.

2 Flags

1 : Active

If set, the mortar will start active and aim and fire automatically. If not set, the op4mortar needs a targetname in order to start off.

16 : Line of sight

If set, the op4mortar will only fire if its target is in direct line of sight. Otherwise, it will fire whenever a target is within range, regardless of whether there is a wall blocking the line ('curve') of fire or not.

32 : Can control

If set, this op4mortar can be controlled through a func_op4mortarcontroller. Obsoletes the 'Active'-flag. Triggering op4mortar will cause it to fire, with respect to its delay between shots.