Home   Help Search Login Register  

Author Topic: nearest road, bush and other non_building island objects  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

Offline Wiper

  • Members
  • *
Hi,
does anyone know how to retrieve non strategic island objects via class names in ArmA in a script ?

the old
nearestObject [obj/pos,"type"]
function should work better now in arma but cause i dont know the correct class names i still cant use it properly, f.e.
nearestObject [player,"road"]
nearestObject [player,"bush"]
nearestObject [player,"tree"]
all dont deliver anything useful.

On the other hand
_posarray nearObjects ["static",_rad];
_posarray nearObjects ["building",_rad];

both seem to deliver the same array results :-\

any ideas / knowledges where to find a reference or documentation how to properly retrieve ANY specific island objects for arma islands  ?



Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: nearest road, bush and other non_building island objects
« Reply #1 on: 29 Jul 2007, 20:59:03 »
This has been discussed at length and it not currently possible due to ArmA not having native string functions. At present the only way to determine the class of map objects is using their p3d name. If we had a fast string comparison function,  and a list of substrings commonly used to name classes of p3d objects, this could be done.
urp!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: nearest road, bush and other non_building island objects
« Reply #2 on: 30 Jul 2007, 00:01:25 »
As already said, it isn't easy, not least because trees, bushes and roads do not actually have classnames.
There is no config entry in any config that gives them a classname, they are .wrp placed objects and don't require classnames normally.

Currently it is only the p3d names as Mr P has said that might possibly be used to determine what an object is, but not all plants or roads have a common string in the names.
The best you can go for would maybe be around 20 strings for each type of object to compare with and as we don't have string functions it isn't really possible.


Planck


I know a little about a lot, and a lot about a little.

Offline Wiper

  • Members
  • *
Re: nearest road, bush and other non_building island objects
« Reply #3 on: 02 Aug 2007, 12:42:45 »
oh well,
thats just what i was afraid of to hear, particularily as we got all those neat and advanced scripting functns in arma now

however, many thanks for your kind answers lads !