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




Introduced in

Version:1.30

Description

Description:Knocks a given unit out, for the specified number of seconds. Once the unit regains consciousness, they remain dizzy for some time. It affects both AI and player units.

Syntax

Syntax:[unit, ko_duration, dizzy_duration, dizzy_magnitude] call fn_vbs_injury_knockout
Parameters:
  • unit: Object - Unit to be knocked out.
  • ko_duration: Number - Seconds to be knocked out for.
  • dizzy_duration: Number - How long to be dizzy for after waking up (optional, determined automatically if omitted).
  • dizzy_magnitude: Number - How dizzy to be after regaining consciousness (0-1) (optional, determined automatically, if omitted).
Return Value:Nothing

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:
[player, 7, 15, 0.2] call fn_vbs_injury_knockout;

Additional Information

See also: fn vbs injury dizziness
Multiplayer:The script should (but does not have to) be executed where unit is local.
Problems: 

Notes