Page MenuHomeFeedback Tracker

nearestObjects not work with "Final" unit classes (2.10)
Feedback, NormalPublic

Description

nearestObjects not work with "Final" unit classes, agents or not-agents (Arma 3 version 2.10).

For example, the code:

nearestObjects [player,[typeOf player],10]

Returns a empty array [].

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Open Arma 3 2.10
Run Eden Editor
Place a unit on the map
Start the mission
Run that on console

nearestObjects [player,[typeOf player],10]

It will return an empty array [], but should return an array with the player.

Additional Information

This started to happens after Arma 3 2.10

Event Timeline

keel created this task.Aug 28 2022, 8:48 AM
keel renamed this task from nearestObjects not work with "Final" classes (2.10) to nearestObjects not work with "Final" unit classes (2.10).Aug 28 2022, 8:54 AM
keel updated the task description. (Show Details)

Works fine in 2.11, could you please confirm this works on dev? @keel

BIS_fnc_KK reassigned this task from BIS_fnc_KK to dedmen.Aug 28 2022, 12:15 PM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
keel added a comment.Aug 28 2022, 4:05 PM

I tested in 2.11.149816 and it's not fixed, still have the problem.

I ran your repro it returns player object

keel added a comment.EditedAug 28 2022, 6:54 PM

Here a image: https://imgur.com/OwtesFi
No mods, map Altis, unit "B_Soldier_A_F".

Got it. Try with default rifleman

BIS_fnc_KK added a subscriber: dedmen.
Leopard20 added a subscriber: Leopard20.EditedAug 28 2022, 10:01 PM

That's weird. It works for me.

Does it happen at a particular coordinate (or on a specific terrain) @keel ?

its fine, reproed, but it is weird indeed

Should be fixed in rev.149837

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Aug 28 2022, 11:33 PM
BIS_fnc_KK changed the task status from New to Feedback.
keel added a comment.EditedAug 29 2022, 4:27 AM

With Default Rifleman ("Rifleman" in EDEN) it works:
https://imgur.com/EVYsssu

It work or not work based if the Class is a base for another class or not:

Here a unit class that is a base for another classes ("C_man_p_shorts_1_F"): https://imgur.com/Qq9APjW
Here a unit class that is not a base for another classes ("C_man_p_shorts_1_F_afro"): https://imgur.com/TZnZ6h4

Waiting for rev.149837 to test.

keel added a comment.Aug 30 2022, 2:56 AM

When rev.149837 will be on Steam?

next dev update probably

Profiling branch today

keel added a comment.EditedSep 8 2022, 7:34 AM

I believe this is old news, but:
Fixed on Dev 2.11.149907