dmarkwick 261 Posted November 5, 2007 Is there any method that will allow me to know what terrain surface a unit is standing on? Roads, sand, grass etc? Share this post Link to post Share on other sites
dmarkwick 261 Posted November 5, 2007 OK, I'll ask the same question in a slightly different way When ArmA needs to play different footstep soundfiles for different surfaces, how does it make this choice? Share this post Link to post Share on other sites
DBO_ 0 Posted November 5, 2007 was looking at this otherday never got to it. i found this refference in ca scripts. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _sand = ["SandAbel", "Sand", "SandBuilding", "SandCain", "DustCain", "SandDark", "RockCain"] _snow = ["Snih", "SnihVar"] _vehicle = (_this select 0) surf = 0 if (({surfaceType (position _vehicle) == _x} count _sand) > 0) then {_surf = 1} else {if (({surfaceType (position _vehicle) == _x} count _snow) > 0) then {_surf = 2}} _color = (_dbase select _surf) its only a section you can read full in \ca\data\scripts\TG wiki surfacetype not ery convincing return Share this post Link to post Share on other sites
fasad 1 Posted November 5, 2007 I suspect ArmA's surfaces work like OFP's - there is a single surface type per terrain grid (40x40m in ArmA, 50x50m in OFP) based upon one of the terrain types within that grid. That means one sound type, dust, roughness etc per grid, even if a grid contains all 4 allowed terrain types I've done a little test on Rahmadi using a script that placed a fire and a map marker every time a unit crossed into a new surfaceType: It seems pretty clear they are on a 40 x 40m grid, surfaceType being #grassSouth if that square contains only grass, and #sandGeneral if that square contains any sand at all. The surfaceType command works (although it only returns the land's surfaceType, not any objects upon the land), it's just ArmA's surface grid resolution is lower than we might expect and want!. Share this post Link to post Share on other sites
dmarkwick 261 Posted November 6, 2007 Hmm. Thanks for the replies guys. I guess I need to fly a helo with a repeating script & fly all over the place to see what comes up. So far, aside from the 2 that are shown there on your tests Fasad, I got one called #GRASS. Share this post Link to post Share on other sites
fasad 1 Posted November 6, 2007 All the default terrain surfaces are defined in the main config: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgSurfaces { ... ... class Grass : Default { access = ReadOnly; files = "trava_*"; rough = 0.1; dust = 0.1; soundEnviron = "grass"; character = "GrassClutter"; }; class GrassSouth : Default { access = ReadOnly; files = "travajih*"; rough = 0.1; dust = 0.2; soundEnviron = "drygrass"; character = "GrassSouthClutter"; }; class ForestLeaves : Default { access = ReadOnly; files = "leslist*"; rough = 0.2; dust = 0.2; soundEnviron = "wood"; character = "ForestLeavesClutter"; }; class ForestNeedles : Default { access = ReadOnly; files = "lesjeh*"; rough = 0.2; dust = 0.2; soundEnviron = "forest"; character = "ForestNeedlesClutter"; }; class RockSouth : Default { access = ReadOnly; files = "skalajih*"; rough = 0.5; dust = 0.2; soundEnviron = "rock"; character = "RockSouthClutter"; }; class RockNorth : Default { access = ReadOnly; files = "skalas*"; rough = 0.5; dust = 0.2; soundEnviron = "rock"; character = "Empty"; }; class Mud : Default { access = ReadOnly; files = "blato*"; rough = 0.3; dust = 0.3; soundEnviron = "mud"; character = "Empty"; }; class CityGround : Default { access = ReadOnly; files = "mesto*"; rough = 0.01; dust = 0.05; soundEnviron = "gravel"; character = "Empty"; }; class DryGround : Default { access = ReadOnly; files = "mesto2*"; rough = 0.05; dust = 0.05; soundEnviron = "gravel"; character = "Empty"; }; class Field1 : Default { access = ReadOnly; files = "pole1*"; rough = 0.3; dust = 0.25; soundEnviron = "mud"; character = "SparseWeedsClutter"; }; class SandGeneral : Default { access = ReadOnly; files = "pisek_*"; rough = 0.1; dust = 0.5; soundEnviron = "sand"; character = "SandGeneralClutter"; }; class SandDesert : Default { access = ReadOnly; files = "pisekpoust*"; rough = 0.2; dust = 0.8; soundEnviron = "sand"; character = "Empty"; }; class SandBeach : Default { access = ReadOnly; files = "pisekplaz*"; rough = 0.1; dust = 0.5; soundEnviron = "sand"; character = "Empty"; }; }; Share this post Link to post Share on other sites
dmarkwick 261 Posted November 6, 2007 Aha thanks for that Fasad Share this post Link to post Share on other sites
[GLT] Legislator 66 Posted November 9, 2007 That's very interesting. I didn't know its possible to return the type of surface. Could it be possible having wheeled vehicles stuck in the mud during heavy rain? (like in video, minute 3) Share this post Link to post Share on other sites
fasad 1 Posted November 9, 2007 It would be possible, but the low resolution of the surface grid would make it a very crude effect. Custom islands/terrains might be able to make use of a smaller surface grid (performance cost?), but on Sahrani I think it's unusable. Share this post Link to post Share on other sites