diag setTerrainHeight: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 7: | Line 7: | ||
|descr= Changes the terrain height of the cell in which given position lies. This command is only available with [[Arma 3: Diagnostics Exe]]. | |descr= Changes the terrain height of the cell in which given position lies. This command is only available with [[Arma 3: Diagnostics Exe]]. | ||
[[File:A3 diag setTerrainHeight.png|350px|See Example 1 for the code | [[File:A3 diag setTerrainHeight.png|thumb|350px|See {{HashLink|#Example 1}} for the code]] | ||
{{Feature | | {{Feature|warning|This causes an instant CTD when ''position'' is out of the map! ({{ic|< 0}} and/or {{ic|> [[worldSize]]}})}} | ||
|gr1= Diagnostic | |gr1= Diagnostic | ||
|s1= position [[ | |s1= position [[diag_setTerrainHeight]] height | ||
|p1= position: [[Array]] | |p1= position: [[Array]] in format [[Position]] | ||
|p2= height: [[Number]] | |p2= height: [[Number]] | ||
Line 20: | Line 20: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf> | ||
private _fnc_flattenTerrain = | |||
{ | { | ||
params ["_start", "_a", "_b", "_h"]; | |||
for "_xStep" from 0 to _a do | |||
{ | { | ||
for "_yStep" from 0 to _b do | |||
{ | { | ||
_start | _start vectorAdd [_xStep, _yStep, 0] diag_setTerrainHeight _h; | ||
}; | }; | ||
}; | }; | ||
}; | }; | ||
[ | private _desiredTerrainHeight = 150; | ||
[getPosWorld player, 50, 50, _desiredTerrainHeight] spawn _fnc_flattenTerrain; | |||
</sqf> | |||
|seealso= [[diag_getTerrainHeight]] | |seealso= [[diag_getTerrainHeight]] | ||
}} | }} |
Revision as of 17:53, 5 May 2022
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:
- Nothing
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; }; }; }; private _desiredTerrainHeight = 150; [getPosWorld player, 50, 50, _desiredTerrainHeight] spawn _fnc_flattenTerrain;
Additional Information
- See also:
- diag_getTerrainHeight
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