fn vbs injury knockout (VBS2)

From Bohemia Interactive Community
Jump to: navigation, search
VBS2 references on this site are not maintained anymore, and may be outdated!
Please use the new, dedicated VBS2 Wiki instead:
http://resources.bisimulations.com/wiki
Introduced in Virtual Battlespace 2 version 1.30

Click on the images for descriptions

Introduced in

Game:
Virtual Battlespace 2
Version:
1.30

Description

Description:
Knocks out a given unit, for the specified number of seconds. In effect, it looks like the target "dies" for a few seconds, then comes back to life. The target will be dizzy after waking up. 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 - optional. How long to be dizzy for after waking up. Decided automatically if omitted.
<dizzy magnitude>: Number - optional. 0 to 1; how dizzy to be after waking up. Decided automatically if omitted.
Return Value:
Nothing
Note

As this is a function, 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 them. More here.

Examples

Example 1:
[player, 7, 15, 0.2] call fn_vbs_injury_knockout;

Additional Information

Multiplayer:
The script should (but doesn't have to) be executed where unit is local.
See also:
fn_vbs_injury_dizziness

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

Bottom Section