isLookingAt (VBS2)

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Virtual Battlespace 2 version 1.00

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.

Notes

Notes

+ Add Note

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

Notes

Bottom Section

Personal tools
Buy ArmA now!