you cannot return a "Typeof" for an object placed on an island during the islands's construction
thats where the problem lies
Try debugging this by using a nearestobject command and trying to return a typeof variable in a hint format, it returns ""
You can do it for an object placed there by a missionmaker
The only way to work around this, is to create a "vegetation" array of object id's, which would be a very big array and take hours to do
The problem with that is, you need an array for each island and also, if that island is updated, the object ID numbers change
so unfortunately, this is another OFP limitation....
mmm just had a thought
when you try to return a typeof, on an object ID, it doesnt return an error, it simply returns ""
so perhaps what you could do is
tx_bush1 = typeof (object xxxx)
tx_bush2 = typeof (object xxxy)
tx_bushes = [tx_bush1,tx_bush2.... etc etc]
and then, it may be possible to use nearestobject and query if that object is in tx_bushes
... perhaps (but that would only work for the 1 island)