intersect: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(removed incorrect assumption and link)
(AGL)
Line 22: Line 22:
|p3= lodName: [[String]] |= Parameter 3
|p3= lodName: [[String]] |= Parameter 3
|p4= [begin, end]: [[Array]] |= Parameter 4
|p4= [begin, end]: [[Array]] |= Parameter 4
|p5= begin: [[Array]] - format [[Position3D]] |= Parameter 5
|p5= begin: [[Array]] - format [[PositionAGL]] |= Parameter 5
|p6= end: [[Array]] - format [[Position3D]] |= Parameter 6
|p6= end: [[Array]] - format [[PositionAGL]] |= Parameter 6


| [[Array]] |= Return value
| [[Array]] |= Return value
Line 48: Line 48:
Fn = {
Fn = {
   {
   {
     Sto set [_foreachindex,[cursortarget,_x] intersect [(asltoatl (eyepos player)),(screentoworld [0.5,0.5])]];
     Sto set [_foreachindex,[cursortarget,_x] intersect [(asltoagl (eyepos player)),(screentoworld [0.5,0.5])]];
   } foreach ["FIRE","VIEW","GEOM","IFIRE"];
   } foreach ["FIRE","VIEW","GEOM","IFIRE"];
   hintsilent format ["FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4",Sto select 0,Sto select 1,Sto select 2,Sto select 3];
   hintsilent format ["FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4",Sto select 0,Sto select 1,Sto select 2,Sto select 3];

Revision as of 10:43, 17 August 2015

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Find named selections in object which is in specified lod intersected by given section of a line. Return value is in the form of [selection, number]. Multiple returned arrays are nested within a single array, and no intersection will return an empty array. "LodName" is one of:
  • "FIRE"
  • "VIEW"
  • "GEOM"
  • "IFIRE" - ("I" stands for Indirect, almost the same as FIRE)
Groups:
Uncategorised

Syntax

Syntax:
[object, lodName] intersect [begin, end]
Parameters:
[object, lodName]: Array
object: Object
lodName: String
[begin, end]: Array
begin: Array - format PositionAGL
end: Array - format PositionAGL
Return Value:
Array

Examples

Example 1:
[_tank, "VIEW"] intersect [[1500, 1500, 2], [1550, 1500, 2]]

Additional Information

See also:
lineIntersectsSurfacesterrainIntersectterrainIntersectASLlineIntersectslineIntersectsWithlineIntersectsObjs

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

Posted on Jul 25, 2007 - 08:37
ManDay
The most common LOD is "FIRE", which identifies the most detailled hitbox used for ammunition.
Posted on Mar 27, 2014 - 14:52
ffur2007slx2_5
Example (In ArmA3 ver 1.14) display returned arrays on cursor entities:
Sto = []; Fn = { { Sto set [_foreachindex,[cursortarget,_x] intersect [(asltoagl (eyepos player)),(screentoworld [0.5,0.5])]]; } foreach ["FIRE","VIEW","GEOM","IFIRE"]; hintsilent format ["FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4",Sto select 0,Sto select 1,Sto select 2,Sto select 3]; }; ["sample_id","onEachFrame","Fn"] call BIS_fnc_addStackedEventHandler; Return FIRE: [something], VIEW: [something], GEOM: [something], IFIRE: [something].

Bottom Section