Spearhead 1944 Code Snippets
Jump to navigation
Jump to search
Determine positions of craters on terrain
The craters that are part of the terrain, are not objects.
They usually have crater decals in them but the once present on the terrain do not link to the config versions which makes detecting them is harder.
In order to detect craters within 10 meters around the player, use the following code:
(nearestObjects [player, [], 10]) select
{
((getModelInfo _x) # 0) in ["spe_crater_decal_large.p3d","spe_crater_decal_small.p3d"]
};
[[Category: Spearhead 1944}}