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

Introduced in

Version:3.7

Description

Description:

Applies a bandage or tourniquet to a specified body part of a unit.

Only works for classes that have the bandageSelectionIndex property defined (in V3.7, these are only the SE and US Army soldiers).

The following treatment options exist:

  • "bandageLeftArmUp"
  • "bandageLeftArmDown"
  • "bandageRightArmUp"
  • "bandageRightArmDown"
  • "bandageLeftLegUp"
  • "bandageLeftLegDown"
  • "bandageRightLegUp"
  • "bandageRightLegDown"
  • "tourniquetLeftArmUp"
  • "tourniquetLeftArmDown"
  • "tourniquetRightArmUp"
  • "tourniquetRightArmDown"
  • "tourniquetLeftLegUp"
  • "tourniquetLeftLegDown"
  • "tourniquetRightLegUp"
  • "tourniquetRightLegDown"

Syntax

Syntax:[unit, treatment, show, apply] call fn_vbs_unitShowBandage
Parameters:
  • unit: Object - Soldier that is affected.
  • treatment: String - Bandage type and body part that should be treated (see description).
  • show: Boolean - If true, then the bandage is shown; if false, it is removed.
  • apply: Boolean - If true, then changes are applied; if false, then nothing is visibly applied, and the function only returns the selection information (optional, default: true).
Return Value:Array or nil - Return value, depending on the action:
    • If show is true, it is: [selection index, texture path].
    • If show is false, it is: [selection index, ""].
    • If show is true or false, and the bandage is already in the desired state, it is: [].
    • If invalid parameters are passed, or the unit does support bandages, it is nil.

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,"bandageLeftArmUp",true] call fn_vbs_unitShowBandage
Bandages are applied to upper and lower arm, and a tourniquet to the upper leg:

{[player,_x,true] call fn_vbs_unitShowBandage}forEach ["bandageRightArmUp","bandageRightArmDown","tourniquetRightLegUp"]

Additional Information

See also: fn vbs aw hasWound, fn vbs aw getWounds, fn vbs aw getBleedingWounds
Multiplayer: 
Problems: 

Notes