Page MenuHomeFeedback Tracker

"mineBase" does not return all types of mines
Closed, ResolvedPublic

Description

I was working on a mod and noticed, with the help of the awesome folks in this thread https://forums.bistudio.com/topic/186418-returning-nearest-mine-reliably-around-player/#entry2946952

that there is no proper/easy way to return all mines near a unit.

Larrow has pretty much summed it up in the abovementioned thread.

Details

Legacy ID
3759993285
Severity
None
Resolution
Won't Fix
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Additional Information

Mine detection is all kinds of FUBAR..

nearestObject [player,"TimeBombCore"]

TimeBombCore will detect most explosives....

"APERSBoundingMine_Range_Ammo"
"APERSMine_Range_Ammo"
"APERSTripMine_Wire_Ammo"
"ATMine_Range_Ammo"
"ClaymoreDirectionalMine_Remote_Ammo"
"DemoCharge_Remote_Ammo"
"IEDLandBig_Remote_Ammo"
"IEDLandSmall_Remote_Ammo"
"IEDUrbanBig_Remote_Ammo"
"IEDUrbanSmall_Remote_Ammo"
"SatchelCharge_Remote_Mag"
"SLAMDirectionalMine_Wire_Ammo"
"UnderwaterMineAB_Range_Ammo",
"UnderwaterMine_Range_Ammo",
"UnderwaterMinePDM_Range_Ammo"

MineGeneric [ x, found, x, found, x, x, x, x, x, x, x, x, found, found, found ]
MineBase [ x, found, x, found, x, x, x, x, x, x, x, x, found, found, found ]
TimeBombCore [ found, x, found, x, found, found, found, found, found, found, found, found, x, x, x ]

Same order as listed above. Note the classes not detected by TimeBombCore, yet..

"APERSMine_Range_Ammo" isKindOf "TimeBombCore" //true

"TimeBombCore" in ([(configfile >> "CfgAmmo" >> "APERSMine_Range_Ammo"),true] call BIS_fnc_returnParents) //true

"ATMine_Range_Ammo" isKindOf "TimeBombCore" //true

"TimeBombCore" in ([(configfile >> "CfgAmmo" >> "ATMine_Range_Ammo"),true] call BIS_fnc_returnParents) //true

"UnderwaterMineAB_Range_Ammo" isKindOf "TimeBombCore" //true

"TimeBombCore" in ([(configfile >> "CfgAmmo" >> "UnderwaterMineAB_Range_Ammo"),true] call BIS_fnc_returnParents) //true

"UnderwaterMine_Range_Ammo" isKindOf "TimeBombCore" //true

"TimeBombCore" in ([(configfile >> "CfgAmmo" >> "UnderwaterMine_Range_Ammo"),true] call BIS_fnc_returnParents) //true

"UnderwaterMinePDM_Range_Ammo" isKindOf "TimeBombCore" //true

"TimeBombCore" in ([(configfile >> "CfgAmmo" >> "UnderwaterMinePDM_Range_Ammo"),true] call BIS_fnc_returnParents) //true

You could do something like...

_mines = [ nearestObject [ player, "MineBase" ], nearestObject [ player, "TimeBombCore" ] ];
_nearest = [ +_mines, [], { _x distanceSqr player }, "ASCEND", { !isNull _x } ] call BIS_fnc_sortBy select 0;

If you dont want to iterate allMines

Event Timeline

R3vo edited Additional Information. (Show Details)Dec 7 2015, 5:25 PM
R3vo set Category to Scripting.
R3vo set Reproducibility to Always.
R3vo set Severity to None.
R3vo set Resolution to Open.
R3vo set Legacy ID to 3759993285.May 8 2016, 1:16 PM
LouMontana closed this task as Resolved.Nov 6 2020, 1:41 PM
LouMontana updated the task description. (Show Details)
LouMontana changed Resolution from Open to Won't Fix.
LouMontana edited Additional Information. (Show Details)
LouMontana set Operating System to Windows 7.