Page MenuHomeFeedback Tracker

nearEntities command doesn not return type WeaponHolder.
New, WishlistPublic

Description

The nearEntities command does not return objects of type WeaponHolder. Since there is no other method to find WeaponHolders other than nearObjects or nearestObjects performance is degraded heavily when searching large areas.

Details

Legacy ID
921377499
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Drop an item from inventory, execute nearEntities on type WeaponHolder, nothing is returned. nearObjects does return.

Additional Information

A WeaponHolder should be classed as an entity.

Event Timeline

Nou edited Steps To Reproduce. (Show Details)Jun 3 2014, 4:58 AM
Nou edited Additional Information. (Show Details)
Nou set Category to Scripting.
Nou set Reproducibility to Always.
Nou set Severity to None.
Nou set Resolution to Open.
Nou set Legacy ID to 921377499.May 7 2016, 6:42 PM
Bohemia added a subscriber: AD2001.Jun 3 2014, 4:58 AM
Nou added a subscriber: Nou.May 7 2016, 6:42 PM
Nou added a comment.Jun 4 2014, 9:07 AM

Vehicles command doesn't work for me with WeaponHolder.

Nou added a comment.Jun 4 2014, 9:07 AM

The only command that does work is allMissionObjects, but that seems overkill.

Perhaps intended, only simulated available at present.

[_pos nearEntities [["All"], 50], {typeof _x == "weaponholdersimulated"}] call BIS_fnc_conditionalSelect // [2c937200# 164051: dummyweapon.p3d]

[_pos nearEntities [["All"], 50], {typeof _x == "weaponholder"}] call BIS_fnc_conditionalSelect // []

[_pos nearEntities [["All"], 50], {typeof _x == "groundweaponholder"}] call BIS_fnc_conditionalSelect // []

Why downvote? Nearobjects takes 10ms where as nearentities takes fraction of that with 5000 radius.

PiepMGI added a subscriber: PiepMGI.May 7 2016, 6:42 PM

Downvoted until demonstration that nearEntities will keep its good performance!

Actually, nearEntities doesn't return "objects" as flag pole, items, crates, fences... It returns man, agent, cars, tanks, "vehicles" intended as locomotion means.
NearObjects returns (almost) everything as each runway edge light! and all objects (edited or embedded in map).

Rather than making nearEntities heavier (slower), please consider a new function like nearLiveObjects allowing a sort in all workable objects (crates, weaponHolder, backpacks, men...) and no "boxes" like some Land_... on map just for scenery.

R34P3R added a subscriber: R34P3R.May 7 2016, 6:42 PM