isOnRoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(AGL)
(see also)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Checks if given object or position is on road. |= Description
| Checks if given position is on road. Same as [[roadAt]], only return is boolean instead of road object. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''isOnRoad''' object |= Syntax
| '''isOnRoad''' position|= Syntax


|p1= object: [[Object]] |= PARAMETER1  
|p1= position: [[Object]] or [[Array]] in format [[PositionAGL]] (especially on bridges) |= PARAMETER1  
 
|p2= |= PARAMETER2
 
|p3= |= PARAMETER3


| [[Boolean]] |= RETURNVALUE  
| [[Boolean]] |= RETURNVALUE  
|s2= '''isOnRoad''' position |= Syntax
|p21= position: [[Array]] - format [[PositionAGL]] (especially on bridges) |= PARAMETER1
|p22= |= PARAMETER2
|p3= |= PARAMETER3
| r2= [[Boolean]] |= RETURNVALUE


|x1= <code>_objOnRoad = [[isOnRoad]] [[player]];</code>|= EXAMPLE1  
|x1= <code>_objOnRoad = [[isOnRoad]] [[player]];</code>|= EXAMPLE1  


|x2= <code>_posOnRoad = [[isOnRoad]] [[getPosATL]] [[player]];</code>|= EXAMPLE1
|x2= <code>_posOnRoad = [[isOnRoad]] [[ASLToAGL]] [[getPosASL]] [[player]];</code>|= EXAMPLE2


____________________________________________________________________________________________
__________________________________________________________________________________________


| [[surfaceIsWater]] |= SEEALSO  
|[[nearRoads]], [[roadsConnectedTo]], [[roadAt]], [[surfaceIsWater]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 20:15, 16 February 2016

Hover & click on the images for description

Description

Description:
Checks if given position is on road. Same as roadAt, only return is boolean instead of road object.
Groups:
Uncategorised

Syntax

Syntax:
isOnRoad position
Parameters:
position: Object or Array in format PositionAGL (especially on bridges)
Return Value:
Boolean

Examples

Example 1:
_objOnRoad = isOnRoad player;
Example 2:
_posOnRoad = isOnRoad ASLToAGL getPosASL player;

Additional Information

See also:
nearRoadsroadsConnectedToroadAtsurfaceIsWater

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section