insideBuilding: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (2.12 released, no longer only dev branch)
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.12
|version1= 2.12
|branch= dev


|gr1= Object Manipulation
|gr1= Object Manipulation


|descr= Returns how much a man is inside a building. The value is the same as normally returned by weapons/ammo sound controller "interior". Fun fact: the sound is considered internal when corresponding surface name starts with "int_". Therefore object placed inside building that does not have model CfgSurface 'soundEviron' param looking like "int_xxxx", would generate external sound inside the building.  
|descr= Returns how much a man is inside a building. The value is the same as normally returned by weapons/ammo sound controller "interior".
It is possible to modify an individual object to use sound interior with [[enableAudioFeature]].
 
{{Feature|informative|
The sound is considered internal when the corresponding surface sound name starts with "int_".
An object placed inside a building that does not have model {{hl|CfgSurfaces}}' {{sic|[[Config Properties Megalist#soundEviron|soundEviron]]}} parameter named this way would generate external sound inside the building, and [[insideBuilding]] on top of this object would return 0.
}}


|s1= [[insideBuilding]] man
|s1= [[insideBuilding]] man
Line 13: Line 18:
|p1= man: [[Object]] - entity of class Man
|p1= man: [[Object]] - entity of class Man


|r1= [[Number]] - in range 0...1, where 0-outside, 1-inside
|r1= [[Number]] - in range 0..1, where 0 is outside, 1 is inside


|x1= <sqf>_inside = insideBuilding player;</sqf>
|x1= <sqf>private _isFullyInside = insideBuilding player == 1;</sqf>


|seealso= [[buildingPos]] [[buildingExit]] [[BIS_fnc_buildingPositions]]
|seealso= [[buildingPos]] [[buildingExit]] [[enableAudioFeature]] [[BIS_fnc_buildingPositions]]
}}
}}

Latest revision as of 15:42, 28 February 2023

Hover & click on the images for description

Description

Description:
Returns how much a man is inside a building. The value is the same as normally returned by weapons/ammo sound controller "interior". It is possible to modify an individual object to use sound interior with enableAudioFeature.
The sound is considered internal when the corresponding surface sound name starts with "int_". An object placed inside a building that does not have model CfgSurfaces' soundEvironsic parameter named this way would generate external sound inside the building, and insideBuilding on top of this object would return 0.
Groups:
Object Manipulation

Syntax

Syntax:
insideBuilding man
Parameters:
man: Object - entity of class Man
Return Value:
Number - in range 0..1, where 0 is outside, 1 is inside

Examples

Example 1:
private _isFullyInside = insideBuilding player == 1;

Additional Information

See also:
buildingPos buildingExit enableAudioFeature BIS_fnc_buildingPositions

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