fn vbs unitObserve (VBS2)
From Bohemia Interactive Community
VBS2 references on this site are not maintained anymore, and may be outdated!
Please use the new, dedicated VBS2 Wiki instead:
Click on the images for descriptions
Introduced in
- Game:</dt>
- Virtual Battlespace 2</dd>
- Version:</dt>
- 1.40</dd>
Description
- Description:</dt>
- Make a unit watch a second unit/object with a video camera or binoculars. Observing unit pivots to follow the target and does not move. Unit stance can be selected. The unit will stop observing after taking damage or condition is met.
Units that do not have a weapon in his or her hand (eg civilians, BLUFOR, or OPFOR with no weapons or weapon on their back), can use binoculars or vbs2_handicam in the "PRONE" or "STAND" position only. The canon camera can only be used in the "KNEEL" or "STAND" position, the exception are units without weapons, they can only "KNEEL" with the canon camera. </dd>
Syntax
- Syntax:</dt>
- [unitObs, unitTgt, weap, <stance>, <condition>] call fn_vbs_unitObserve </dd>
- Parameters:</dt>
- unitObs: Object - unit that will observe
- unitTgt: Object - unit to be observed
- weap: String - type of optics, can be "binocular", "vbs2_handicam", "vbs2_canon_xl1"
- stance: String - optional, can be "STAND", "KNEEL" or "PRONE". Default is "STAND"
- <condition>: Code - optional condition must return TRUE to stop observation. If omitted, unit stops observing after taking damage.
- unitTgt: Object - unit to be observed
- Return Value:</dt>
- Nothing </dd>
Examples
- Example 1:</dt>
[enemy1, unit1, "vbs2_canon_xl1", "KNEEL", {unit1 in car1}] call fn_vbs2_unitObserve; //Enemy1 will observe unit1 in the kneeling position with a Canon camera until unit1 enters car1- Example 2:</dt>
[enemy1, unit1, "binocular"] call fn_vbs2_unitObserve; //Enemy1 will observe unit1 in the standing position with binoculars until enemy1 takes damage
Additional Information
- Multiplayer:</dt>
- -</dd>