Difference between revisions of "VN ms fnc tracker receiveNoise"
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " {{Function" to "Category:TODO {{Function") |
Lou Montana (talk | contribs) m (Text replacement - "]]; |p1n=" to "]] |p1n=") |
||
Line 51: | Line 51: | ||
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small> | </pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small> | ||
− | |s= [] call [[vn_ms_fnc_tracker_receiveNoise]] | + | |s= [] call [[vn_ms_fnc_tracker_receiveNoise]] |
|p1n= | |p1n= |
Revision as of 21:21, 20 January 2021
← back to Functions | Introduced in S.O.G. Prairie Fire v1.00 by Wyqer, veteran29 |
|
Description
/* Author: Wyqer, veteran29 Date: 2019-08-10 Description: Handle client generated noise. Parameter(s): _shooter - Unit that made the noise [OBJECT, defaults to objNull] _distance - Hearable noise distance [NUMBER, defaults to 0] Returns: Function reached the end [BOOL] */ params [ ["_shooter", objNull, [objNull]], ["_distance", 100, [0]] ]; private _nearbyUnits = allUnits inAreaArray [getPos _shooter, _distance, _distance]; private _nearbyGroups = _nearbyUnits apply {group _x}; { // we can consider moving AIs on top of heard shot, // would need a exclude for static sentries (eg. on trees) // units _x doMove position _shooter; // we can consider something more complex here, // current tests show that even giving little info about player makes AI a lot more aggresive [_x, [_shooter, 0.01]] remoteExec ["reveal", _x]; } forEach (_nearbyGroups arrayIntersect _nearbyGroups); #ifdef VN_DEBUG systemChat format ["[Tracker] Noise propagated: %1, %2", _shooter, _distance]; #endif true(Placeholder description extracted from the function header by LM_exportFunctionsToWiki.sqf)
Syntax
- Syntax
- [] call vn_ms_fnc_tracker_receiveNoise
- Return value
- Nothing
Examples
- Example 1
-