Jump to content

Recommended Posts

Posted (edited)

didn't found any info about it :

 

is there a way to know if at a point of the land map there is an object (that is not a unit) ? building, tree, and so on ...

any way to check that or impossible ?

 

is there a way to access read buildings heights somewhere ?

Edit : maybe with SceneryObject.getDescByName() ? , or use infos from scripts/database/db_categories.lua, but I still don't know how to ...

Edit : with world.searchObjects() on a short segment ?

but how to use a land point to match with these infos ? = knowing a specif land point, want to know what is there, its name and properties... someone already tried that ?

Edited by C6_Hellfrog
Posted

You can use world.searchObjects to find scenery objects within a given volume. It won't find trees, but normal buildings should be accessible. I believe the smallest type of object it "sees" are the light polls.

 

I need to state there is likely a caveat. At least the last time I checked, it doesn't work at all on Nevada.

 

Any.getDescByName() basically just takes a string value and returns whatever is the description for that object without the need to directly access a world object and using getDesc() on it.

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

another idea came to me with that.

 

Do you think we can use it to compensate lack of buildings detection in LOS function ?

knowing target.point and unit.point, we could check all the line between the both, and calculate if a building is present, if its height is too much to maintain the LOS and will break it... a thing the LOS function cannot do.

 

or it wil not be precise enough or it will consume too muche processor time / FPS impact ?

 

because I think someone else should already have had the idea I suppose...

 

but to use it we have to edit the IA scripts ... to avoid that bad snipper ability they have...

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...