Jump to content
Sign in to follow this  
Pierrot

How to know the ground texture?

Recommended Posts

Hi all!

Is there any way to detect the ground texture on which a target unit is?

If we knew the ground texture, for example grass, water, road(runway), desert or snow, we could put appropriate chopper dust! i.e. when the chopper is flying close over a desert, sand dust will be raised and when over a snowfield, then snow dust will be!

Share this post


Link to post
Share on other sites

when you setup your mission you know where the helo will come down most of the time. If not use a neutral dust script.

As far as I know there is no way to detect texture type in ME.

Share this post


Link to post
Share on other sites

Has been made in some dust scripts though, so someone knows.

Share this post


Link to post
Share on other sites
Has been made in some dust scripts though, so someone knows.

No it wasn't.

You can only say whether you're over water or over land. And over land you can take the height and say that above this height there is snow. That's all you can do with pure scripting.

There would be one option, but it wouldn't be efficient: You could create a tool which reads coordinates and textures from a wrp-file and make a look-up-table for your dust. But this would be heavily slow, since you had to give all cells a dust-color and would have to look it up.

So: No way.

Share this post


Link to post
Share on other sites

Hmmm.... wink_o.gif

So there is no smart way to detect ground textures except water or ground?

O.k. then, how can you tell whether an unit is on ground or on water? And can you also tell whether any air planes or choppers which are flying are over ground or over water(sea, river)?

Share this post


Link to post
Share on other sites
O.k. then, how can you tell whether an unit is on ground or on water? And can you also tell whether any air planes or choppers which are flying are over ground or over water(sea, river)?

If you want to know whether an unit is on land or in water then look at the CoC_Diver-scripts.

If you want to know whether a plane/helicopter is over water or over land look either at my heli_dust-script (click www in my profile) or take DKM or BAS-rotor downwash script.

I'm sure that you will find in some of them my _calcH-function that is used for this.

Share this post


Link to post
Share on other sites
If you want to know whether an unit is on land or in water then look at the CoC_Diver-scripts.

Thank you, bigpoppa.

I visited you web site and found "heli_dust-script" but couldn't find "CoC_Diver-scripts". Where can I get it?

Share this post


Link to post
Share on other sites

looking through the helidust script I see the way to tell if you are over water or land is related to the abolute height of your position.

If you are over water your height above sea level will be less than 3. If you are over land your height above sea level will go up the higher you go.

Looking at vektorboson's script he creates an "EmptyDetector" object then checks it's height after moving it to the place in question.

Share this post


Link to post
Share on other sites
looking through the helidust script I see the way to tell if you are over water or land is related to the abolute height of your position.

If you are over water your height above sea level will be less than 3. If you are over land your height above sea level will go up the higher you go.

Looking at vektorboson's script he creates an "EmptyDetector" object then checks it's height after moving it to the place in question.

That's not 100% correct.

It depend on the z-coordinate of the EmptyDetector, which in fact is the class name of a trigger. Triggers are always at sea level and with getpos you get the relative height of the trigger to the terrain.

So you have basically to check whether the z-coordinate of this trigger is positive or negative. Negative values mean, that the trigger is under ground, positive mean that the trigger above ground (say ground is under water).

For some odd reason you have to set the threshold as 3m because otherwise the script is someway unstable and you will get overland dust when over water.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×