diag setTerrainHeight: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{RV|type=command |game1= arma3diag |version1= 2.05 |descr= |gr1= Diagnostic |s1= [[{{PAGENAMEE}}]] |p1= argumentName: Type - (Optional, default defaultValue) de...") |
(formatting) |
||
Line 5: | Line 5: | ||
|version1= 2.05 | |version1= 2.05 | ||
|descr= | |descr= Changes the terrain height of the cell in which given position lies. This command is only available with [[Arma 3: Diagnostics Exe]].</br> | ||
[[File:A3 diag setTerrainHeight.png|350px|See Example 1 for the code|thumb|right]] | |||
|gr1= Diagnostic | |gr1= Diagnostic | ||
|s1= [[{{PAGENAMEE}}]] | |s1= position [[{{PAGENAMEE}}]] height | ||
|p1= | |p1= position: [[Array]] - In format [[Position]] | ||
|p2= | |p2= height: [[Number]] | ||
| | |x1= <code>[[private]] _fnc_flattenTerrain [[a = b|=]] | ||
{ | |||
[[params]] ["_start", "_a", "_b", "_h"]; | |||
[[for]] "_xStep" [[from]] 0 [[to]] _a [[do]] | |||
{ | |||
[[for]] "_yStep" [[from]] 0 [[to]] _b [[do]] | |||
{ | |||
_start [[vectorAdd]] [_xStep, _yStep, 0] '''diag_setTerrainHeight''' _h; | |||
}; | |||
}; | |||
}; | |||
<nowiki>[</nowiki>[[position]] [[player]], 50, 50, 150] [[spawn]] _fnc_flattenTer[[rain]];</code> | |||
|seealso= | |||
|seealso= | |||
}} | }} |
Revision as of 10:40, 26 April 2021
Description
- Description:
- Changes the terrain height of the cell in which given position lies. This command is only available with Arma 3: Diagnostics Exe.
- Groups:
- Diagnostic
Syntax
- Syntax:
- position diag_setTerrainHeight height
- Parameters:
- position: Array - In format Position
- height: Number
- Return Value:
- Return value needed
Examples
- Example 1:
private _fnc_flattenTerrain = { params ["_start", "_a", "_b", "_h"]; for "_xStep" from 0 to _a do { for "_yStep" from 0 to _b do { _start vectorAdd [_xStep, _yStep, 0] diag_setTerrainHeight _h; }; }; }; [position player, 50, 50, 150] spawn _fnc_flattenTerrain;
Additional Information
- See also:
- See also needed
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
[[Category:Introduced with arma3diag version 2.05]][[ Category: arma3diag: New Scripting Commands | DIAG SETTERRAINHEIGHT]][[ Category: arma3diag: Scripting Commands | DIAG SETTERRAINHEIGHT]]