vova _fox 0 Posted November 21, 2007 As i understand only 'nearestobject id' command can find objects like trees, shapes..etc. But it not universal, because id has various numbers and usually don't depend but it positions on isalnd. I need more universal script \ function, that can find all objects at some position with some radius, with types and without types. Any ideas? Share this post Link to post Share on other sites
fasad 1 Posted November 21, 2007 Quote[/b] ]As i understand only 'nearestobject id' command can find objects like trees, shapes..etc. You can use nearestObjects to return all objects, classed and unclassed. eg: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nearestObjects [position player,[], 100] edit:<s>I've added a note in the wiki, since this has come up before.</s> It was already noted in the wiki article Share this post Link to post Share on other sites
dmarkwick 261 Posted November 21, 2007 Hmm OK this is of interest to me. So will this command also return vegetation objects? If so does anyone know what format it's returned seeing as map vegetation objects do not have class names? Share this post Link to post Share on other sites
DBO_ 0 Posted November 21, 2007 My understanding is, it will not return vegetation objects placed in visitor . donegovol <(sp?) tried very hard to capture these and there is a thread somewhere or he is always on ofpec irc, maybe he did it who knows. Share this post Link to post Share on other sites
vova _fox 0 Posted November 21, 2007 hahaha i'am everytime type nearestobject [getpos player,["all"], 100] i'am forgot that that objects aren't have classes <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nearestObjects [position player,[], 100] Works great! Thanks, fasad Share this post Link to post Share on other sites
fasad 1 Posted November 21, 2007 Hmm OK this is of interest to me. So will this command also return vegetation objects? Yes. Quote[/b] ]If so does anyone know what format it's returned seeing as map vegetation objects do not have class names? Format is <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><objectID>: <model.p3d> example:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">3801: stone3.p3d To make use of the returned model p3d you probably need to use the slow string tool library to strip the objectID from the returned string, which is a not very realistic for real-time performance. Share this post Link to post Share on other sites
dmarkwick 261 Posted November 22, 2007 Hmm OK this is of interest to me. So will this command also return vegetation objects? Yes. Quote[/b] ]If so does anyone know what format it's returned seeing as map vegetation objects do not have class names? Format is <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><objectID>: <model.p3d> example:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">3801: stone3.p3d To make use of the returned model p3d you probably need to use the slow string tool library to strip the objectID from the returned string, which is a not very realistic for real-time performance. Aaah the string tool library? linky winky pleasey The implementation I'm thinking of doesn't require real-time performance, I'd just like a list of vegetation within a radius (prolly have to manually weed out named models from a list) so I can work out a spreading fire pattern. Share this post Link to post Share on other sites
fasad 1 Posted November 22, 2007 Quote[/b] ]Aaah the string tool library? linky winky pleasey You lazy bugger! Search results for topics containing "string" within mission editing & scripting (Hint : it was released by Kronzky) If you are interested in performance, you might have to use Voyager's ArmA Extended DLL, which adds external string manipulation functions which must be faster than the ArmA script brute force method. I think Nutty_101's tools can do a similar task, but I haven't bothered to set up a dedicated server just to find out. Share this post Link to post Share on other sites
dmarkwick 261 Posted November 22, 2007 Quote[/b] ]Aaah the string tool library? linky winky pleasey You lazy bugger! Search results for topics containing "string" within mission editing & scripting (Hint : it was released by Kronzky) If you are interested in performance, you might have to use Voyager's ArmA Extended DLL, which adds external string manipulation functions which must be faster than the ArmA script brute force method. I think Nutty_101's tools can do a similar task, but I haven't bothered to set up a dedicated server just to find out. LOL, thanks for the link but really you only had to say "Kronzky" and I would have been over at his site sniffing it out RE the extended DLL, that would be something that mission servers/players would need to have also though, right? Share this post Link to post Share on other sites
fasad 1 Posted November 22, 2007 Quote[/b] ]RE the extended DLL, that would be something that mission servers/players would need to have also though, right? Well yes, at least the server (including hosted server, including SP) would need such a program. It's a balancing act : CPU time/power vs additional external requirements. edit: I'd be trying the string library first. Share this post Link to post Share on other sites