surfaceType: Difference between revisions
Jump to navigation
Jump to search
(add. classification) |
Lou Montana (talk | contribs) m (Text replacement - "↵↵</sqf>" to " </sqf>") |
||
(65 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| | |game1= ofpe | ||
|version1= 1.00 | |||
|1.00 | |game2= arma1 | ||
|version2= 1.00 | |||
| | |game3= arma2 | ||
|version3= 1.00 | |||
| | |game4= arma2oa | ||
|version4= 1.50 | |||
| | |game5= tkoh | ||
|version5= 1.00 | |||
| | |game6= arma3 | ||
|version6= 0.50 | |||
| | |gr1= Positions | ||
|descr= Returns what surface type is at the given position. For surface texture see [[surfaceTexture]] command.<br> | |||
<br> | |||
{{Feature|informative|The command returns surface type of the ground, even underneath objects such as buildings and roads}} | |||
<spoiler text="Show surface types (Armed Assault)"> | |||
* #GRASSSOUTH | |||
* #GRASSGENERAL | |||
* #SANDGENERAL | |||
</spoiler> | |||
<spoiler text="Show surface types (Arma 2)"> | |||
* #UTGRASS - for natural surfaces | |||
* #UTCONCRETE - for urban surfaces | |||
</spoiler> | |||
<spoiler text="Show surface types (Arma 3)"> | |||
{{Columns|4| | |||
* BuildingRubble | |||
* BuildingRubble_exp | |||
* cardboard | |||
* cardboard_exp | |||
* carpet | |||
* carpet_exp | |||
* carpet_inside | |||
* carpet_in_exp | |||
* concrete | |||
* concrete_exp | |||
* concrete_hall | |||
* concrete_hall_exp | |||
* concrete_inside | |||
* concrete_in_exp | |||
* concrete_out | |||
* Default | |||
* dirtrunway | |||
* floor | |||
* floor_exp | |||
* floor_inside | |||
* floor_in_exp | |||
* GdtAsphalt | |||
* GdtBeach | |||
* GdtCliff | |||
* GdtConcrete | |||
* GdtDead | |||
* GdtDesert | |||
* GdtDirt | |||
* GdtField | |||
* GdtForest | |||
* GdtForestMalden | |||
* GdtForestPine | |||
* GdtGrassDry | |||
* GdtGrassGreen | |||
* GdtGrassLong | |||
* GdtGrassShort | |||
* GdtGrassTall | |||
* GdtGrassWild | |||
* GdtKLCobblestone | |||
* GdtKLDirt | |||
* GdtKlField | |||
* GdtKLForestCon | |||
* GdtKLForestDec | |||
* GdtKLGrass1 | |||
* GdtKLGrass2 | |||
* GdtKlSoil | |||
* GdtKlStubble | |||
* GdtKlTarmac | |||
* GdtKlWeatheredTarmac | |||
* GdtMarsh | |||
* GdtMud | |||
* GdtRedDirt | |||
* GdtRock | |||
* GdtRubble | |||
* GdtSeabed | |||
* GdtSeabedExp | |||
* GdtSoil | |||
* GdtStony | |||
* GdtStonyThistle | |||
* GdtStratisBeach | |||
* GdtStratisConcrete | |||
* GdtStratisDirt | |||
* GdtStratisDryGrass | |||
* GdtStratisForestPine | |||
* GdtStratisGreenGrass | |||
* GdtStratisRocky | |||
* GdtStratisSeabed | |||
* GdtStratisSeabedCluttered | |||
* GdtStratisThistles | |||
* GdtThorn | |||
* GdtVolcano | |||
* GdtVolcanoBeach | |||
* GdtVRsurface01 | |||
* GdtWeed | |||
* GdtWildField | |||
* grid | |||
* grid_exp | |||
* lino | |||
* lino_exp | |||
* lino_in_exp | |||
* mat_in_exp | |||
* metalPlate | |||
* metalPlatePressed_exp | |||
* metalPlate_exp | |||
* metalPlate_in_exp | |||
* mud | |||
* mud_exp | |||
* parquet | |||
* planks | |||
* planks_exp | |||
* planks_inside | |||
* planks_in_exp | |||
* road | |||
* road_exp | |||
* roof_tiles_exp | |||
* rubble | |||
* rubble_exp | |||
* sand | |||
* sand_exp | |||
* softwood_in_exp | |||
* steel | |||
* steel_exp | |||
* stones | |||
* stones_exp | |||
* straw_exp | |||
* SurfIntConcrete | |||
* SurfIntMetal | |||
* SurfIntTiles | |||
* SurfIntWood | |||
* surfint_concrete | |||
* surfint_metal | |||
* surfint_tiles | |||
* surfint_wood | |||
* SurfMetal | |||
* SurfRoadConcrete | |||
* SurfRoadConcrete_exp | |||
* SurfRoadDirt | |||
* SurfRoadDirt_Enoch | |||
* SurfRoadDirt_exp | |||
* SurfRoadTarmac | |||
* SurfRoadTarmac1_Enoch | |||
* SurfRoadTarmac2_Enoch | |||
* SurfRoadTarmac3_Enoch | |||
* SurfRoadTarmac_exp | |||
* SurfRoofTiles | |||
* SurfRoofTin | |||
* SurfTrailDirt_Enoch | |||
* SurfTrailDirt_exp | |||
* SurfWater | |||
* SurfWood | |||
* surf_metal | |||
* surf_roadconcrete | |||
* surf_roaddirt | |||
* surf_roadtarmac | |||
* surf_rooftiles | |||
* surf_rooftin | |||
* surf_wood | |||
* TEST_SurfNormal | |||
* tiling | |||
* trash | |||
* trash_exp | |||
* Water | |||
* wavyMetal | |||
* wavyMetal_exp | |||
* woodenFloor | |||
}} | }} | ||
</spoiler> | |||
|s1= [[surfaceType]] [x, y, z or useLayerMask] | |||
|p1= x: [[Number]] - world x coordinate of the position | |||
[[ | |p2= y: [[Number]] - world y coordinate of the position | ||
[[ | |p3since=arma3 2.18 | ||
[[ | |p3= z or useLayerMask: [[Number]] or [[Boolean]] - When a number is provided (Z in 3D positions), it is ignored. When a boolean is provided, it defines whether the layer mask should be used. Using the layer mask is more accurate but slightly slower. | ||
[[ | [[File:Capture.png|thumb|256px|The patches of "dirt" are defined using a layer mask. The "concrete" is the primary surface texture.]] | ||
[[ | |r1= [[String]] - Surface type | ||
|x1= <sqf>private _surface = surfaceType [4500, 4500];</sqf> | |||
|x2= <sqf>hint surfaceType getPosWorld player;</sqf> | |||
|x3= <sqf> | |||
private _pos = getPosWorld player; | |||
_pos set [2, true]; // use layer mask | |||
surfaceType _pos; | |||
</sqf> | |||
|seealso= [[surfaceTexture]] [[surfaceIsWater]] [[surfaceNormal]] [[getAllEnvSoundControllers]] | |||
}} |
Latest revision as of 19:48, 3 September 2024
Description
- Description:
- Returns what surface type is at the given position. For surface texture see surfaceTexture command.
- #GRASSSOUTH
- #GRASSGENERAL
- #SANDGENERAL
- #UTGRASS - for natural surfaces
- #UTCONCRETE - for urban surfaces
↑ Back to spoiler's top- BuildingRubble
- BuildingRubble_exp
- cardboard
- cardboard_exp
- carpet
- carpet_exp
- carpet_inside
- carpet_in_exp
- concrete
- concrete_exp
- concrete_hall
- concrete_hall_exp
- concrete_inside
- concrete_in_exp
- concrete_out
- Default
- dirtrunway
- floor
- floor_exp
- floor_inside
- floor_in_exp
- GdtAsphalt
- GdtBeach
- GdtCliff
- GdtConcrete
- GdtDead
- GdtDesert
- GdtDirt
- GdtField
- GdtForest
- GdtForestMalden
- GdtForestPine
- GdtGrassDry
- GdtGrassGreen
- GdtGrassLong
- GdtGrassShort
- GdtGrassTall
- GdtGrassWild
- GdtKLCobblestone
- GdtKLDirt
- GdtKlField
- GdtKLForestCon
- GdtKLForestDec
- GdtKLGrass1
- GdtKLGrass2
- GdtKlSoil
- GdtKlStubble
- GdtKlTarmac
- GdtKlWeatheredTarmac
- GdtMarsh
- GdtMud
- GdtRedDirt
- GdtRock
- GdtRubble
- GdtSeabed
- GdtSeabedExp
- GdtSoil
- GdtStony
- GdtStonyThistle
- GdtStratisBeach
- GdtStratisConcrete
- GdtStratisDirt
- GdtStratisDryGrass
- GdtStratisForestPine
- GdtStratisGreenGrass
- GdtStratisRocky
- GdtStratisSeabed
- GdtStratisSeabedCluttered
- GdtStratisThistles
- GdtThorn
- GdtVolcano
- GdtVolcanoBeach
- GdtVRsurface01
- GdtWeed
- GdtWildField
- grid
- grid_exp
- lino
- lino_exp
- lino_in_exp
- mat_in_exp
- metalPlate
- metalPlatePressed_exp
- metalPlate_exp
- metalPlate_in_exp
- mud
- mud_exp
- parquet
- planks
- planks_exp
- planks_inside
- planks_in_exp
- road
- road_exp
- roof_tiles_exp
- rubble
- rubble_exp
- sand
- sand_exp
- softwood_in_exp
- steel
- steel_exp
- stones
- stones_exp
- straw_exp
- SurfIntConcrete
- SurfIntMetal
- SurfIntTiles
- SurfIntWood
- surfint_concrete
- surfint_metal
- surfint_tiles
- surfint_wood
- SurfMetal
- SurfRoadConcrete
- SurfRoadConcrete_exp
- SurfRoadDirt
- SurfRoadDirt_Enoch
- SurfRoadDirt_exp
- SurfRoadTarmac
- SurfRoadTarmac1_Enoch
- SurfRoadTarmac2_Enoch
- SurfRoadTarmac3_Enoch
- SurfRoadTarmac_exp
- SurfRoofTiles
- SurfRoofTin
- SurfTrailDirt_Enoch
- SurfTrailDirt_exp
- SurfWater
- SurfWood
- surf_metal
- surf_roadconcrete
- surf_roaddirt
- surf_roadtarmac
- surf_rooftiles
- surf_rooftin
- surf_wood
- TEST_SurfNormal
- tiling
- trash
- trash_exp
- Water
- wavyMetal
- wavyMetal_exp
- woodenFloor
- Groups:
- Positions
Syntax
- Syntax:
- surfaceType [x, y, z or useLayerMask]
- Parameters:
- x: Number - world x coordinate of the position
- y: Number - world y coordinate of the position
- since 2.18
- z or useLayerMask: Number or Boolean - When a number is provided (Z in 3D positions), it is ignored. When a boolean is provided, it defines whether the layer mask should be used. Using the layer mask is more accurate but slightly slower.
- Return Value:
- String - Surface type
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Elite version 1.00
- Operation Flashpoint: Elite: New Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Positions