Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.7

Description

Description:Returns how far a person would sink into a snow layer. If no snow biotope is enabled, or no snow exists at the examined position, then 0 is returned.

Syntax

Syntax:[unit] call fn_vbs_displacedSnowDepth
Parameters:
  • unit: Unit - Unit to check. The unit current setUnitPos is considered.
Return Value:Number - Depth (in meters) the unit would sink into the snow.

Alternative Syntax

Syntax:[position, stance] call fn_vbs_displacedSnowDepth
Parameters:
  • position: Position-2 - Position to evaluate (Z-value can be specified, but is ignored).
  • stance: String - Stance to evaluate. Can be "UP", "MIDDLE" or "DOWN".
Return Value:Number - Depth (in meters) a unit at the specified position and stance would sink into the snow.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_sink = [player] call fn_vbs_displacedSnowDepth
_sink = [[2500,2500], "UP"] call fn_vbs_displacedSnowDepth

Additional Information

See also: snowHeight, getBiotope, getBiotopeComponents
Multiplayer: 
Problems: 

Notes