Commands/Lua

Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Category: server (201)

CS2D Command sv_offscreendamage

Categories

Parameters

  • off-screen damage (0/1): disabled (0) or enabled (1, default)

Info

Controls if shooting at players/hostages/npcs/objects which are outside the screen causes damage (1, default) or not (0).

By default this setting is enabled which means you can shoot at stuff you don't see on your screen and you will still cause damage. This is also the more realistic and recommended setting.

Set this setting to 0 if you want players (and turrets/NPCs) only to cause damage on objects which are in their visible screen area. This can lead to more fair game play.

Note: A target is considered "off-screen" if its distance to the attacker is bigger than (850/2)+32 on the X-axis or bigger than (480/2)+32 on the y-axis. So the check is actually based on distance only.

Note: Fog of war has no impact on this setting. People hidden in fog of war can always be damaged.

Note: Related Lua hooks and effects will not be triggered when someone or something is hit off-screen when this setting is set to 0!

Note: This setting only affects gun shots & lasers. Explosives like rockets, mines, grenades etc. are NOT affected by this setting. They can always deal off-screen damage.

Lua Hook Lua Hooks

Lua Command Lua Commands