Page MenuHomeFeedback Tracker

nearestObjects can't detect ammo parent classes
Feedback, NormalPublic

Description

It seems that nearestObjects can detect ammo objects, but it can't detect their parent classes. So I guess that's a bug, not a feature. Meanwhile nearObjects and nearestObject commands work.

E.g this returns the missile objects:

nearestObjects [_pos, [], 3];

but this doesn't:

nearestObjects [_pos, ["RocketBase", "MissileBase"], 3];

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 created this task.Jul 7 2022, 7:40 PM
dedmen added a subscriber: dedmen.Jul 13 2022, 11:28 AM

configfile >> "CfgAmmo" >> "ClaymoreDirectionalMine_Remote_Ammo"
["DirectionalBombBase","DirectionalBombCore","TimeBombCore","Default"]

repro, place explosive specialist in VR, place down claymore mine, run command

nearestObjects [getPos player, ["ClaymoreDirectionalMine_Remote_Ammo"], 3];

doesn't work even though classname is exact match

nearestObjects [getPos player, ["DirectionalBombBase"], 3];

doesn't either

Yeah, inheritance check only works for AI entities, which mine obviously isn't... I don't know why that code is there, the other commands you mentioned indeed don't have it

dedmen changed the task status from New to Feedback.Jul 13 2022, 11:46 AM
dedmen set Ref Ticket to AIII-55269.