isLookingAt (VBS2)
From Bohemia Interactive Community
| Editors, please check Policy: Scripting Command Page Syntax. |
Click on the images for descriptions
Introduced in
- Game:
- Virtual Battlespace 2
- Version:
- 1.00
Description
- Description:
- Returns true if the first object is looking into the direction of the second object (within the angle specified). Whether there are objects between the "looker" and the target object that might be obstructing the view is not taken into consideration.
Syntax
- Syntax:
- obj1 isLookingAt [obj2,angle]
- Parameters:
- obj1: Object - Unit that is looking
- obj2: Object - Object that is being looked at
- angle: Number - Angle within which the target has to be.
Angle is considered in both directions - i.e. if the object is 29ยบ left or right of the object, an angle definition of 30 will get either. - Return Value:
- Boolean
Examples
- Example 1:
_helooks = player isLookingAt [dog, 15]
Additional Information
- Multiplayer:
- Behaviour unknown.

