Page MenuHomeFeedback Tracker

Please add the possibility of specifically detecting trees
New, WishlistPublic

Description

As far as I know, it currently isn't really possible to specifically detect trees.
When using nearestObjects, for example, you can filter for buildings and whatnot, but trees... nope. (Or can you?!)

There sure are ways such as filtering the strings, stuff like that, but a performant way is something different.

Details

Legacy ID
917214790
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting

Event Timeline

Laxemann edited Steps To Reproduce. (Show Details)Oct 26 2014, 1:24 PM
Laxemann edited Additional Information. (Show Details)
Laxemann set Category to Scripting.
Laxemann set Reproducibility to Always.
Laxemann set Severity to None.
Laxemann set Resolution to Open.
Laxemann set Legacy ID to 917214790.May 7 2016, 7:41 PM

what about:

trees = [];
{
if ((str _x) find ": t_" > -1) then {

		trees pushBack _x;

};
} forEach nearestObjects [player, [], 100];

Hm, I by far am no master to sqf, but this looks performance heavy.
I'm aiming for a solution that will be called for each shot.
Do you think this is a practicable way?
(Can't test it right now)

So, I checked it and it's been around 0.002 secs for ~30m or so.
Thanks for pointing that out, mate, I'll see if this fits my needs. :)

0.00089s (0.89ms) in the middle of a forest for me with 30 radius (22 trees counted)