Page MenuHomeFeedback Tracker

[CLOSABLE] <b>nearObjects</b> and similar commands do not return environment textures like soil or roads
Closed, ResolvedPublic

Description

<i><b>Updated again: This ticket may be closed as there has been reasonable answers.</b></i>

<i><b>Updated since the question regarding rocks and trees was based on a lack of knowledge.</b></i>

Commands like <b>nearObjects</b> or <b>nearestObjects</b> do return trash constainers, houses, certain walls, flies and bees.

But these commands do not return sidewalks, bushes, soil, road texture etc.

Why is that?

IMHO a scripter should be able to handle everything returned by such commands, even if it's a a road texture or anything else. That's why I don't understand why these commands don't return these as objects.

Details

Legacy ID
1708479074
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Use the commands nearObjects or nearestObjects in a script putting out the result as a hint or writing it into the RPT log.

Additional Information

This ticket may be closed as there has been reasonable answers

Event Timeline

HereisJohnny edited Additional Information. (Show Details)
HereisJohnny set Category to Scripting.
HereisJohnny set Reproducibility to Always.
HereisJohnny set Severity to None.
HereisJohnny set Resolution to Fixed.
HereisJohnny set Legacy ID to 1708479074.May 7 2016, 7:09 PM

nearestObjects https://community.bistudio.com/wiki/nearestObjects does, and the example is right there on biki:

nearestObjects [player, [], 50];

Hey Killzone Kid!

Just to do a short act of worshiping, I'm very impressed of your skripting skills judgin from what you post on your site. Kudos! ;-)

Now for <b>nearestObjects</b> function, it returned some "sharpe stone" or so, but for the trees it only gave me one tree so far, the <i>t_ficusb1s</i>. I tested it standing between two different trees (basketball court in Kavala), yet it only returns the ficus. It also returns me two ficusses (or whatever the plural is) if I'm standing between two of them, but no other trees.

I'm wondering why, because I used it just as it is in the wiki (only with a 10 meter radius).

Btw, I don't know how many people have already asked you, but do you have an email, XMPP-address or another chat possibility? I might have some questions...

If you are in the DayZ forum, you can find me as "Heeeere's Johnny".

Best regards,
Johnny

It is simple, distance to a tree is measured to its centre, which is about half way up the trunk. So to detect tall trees you need to increase detection radius.

Oh! Strange, but ... ok. Good thing to know. Thanks!

(Still, any way to contact you for some more questions?)

EDIT: OK, rocks and trees do work. But still, I can't get any bushes or grass. Except for actual terrain structures like roads or soil, I don't get why it doesn't return any bushes or grass... seemingly...

I personally believe the main reason our access to map objects, like vegetation and road objects, is limited because they don't have cfgVehicles classes. That's what separates editor objects from these specific map objects. The very fact that their simulation is extremely limited is likely what allows such vast quantities of them to be placed down.

Also, I believe grass is procedurally generated with the map, so I wouldn't expect to be able to mess with it that much.

Seems senseful. That's one of the annoying things though. Obviously BI has a way to do certain things like AI pathfinding on roads and such. But because this is classified information, no "non-Bohemian" can actually participate in improving SQF as for instance path finding is always an issue. :-(

Closing as per request.