diag setTerrainHeight: Difference between revisions

From Bohemia Interactive Community
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...")
 
m (Text replacement - "{{HashLink" to "{{Link")
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


|game1= arma3diag
|game1= arma3
|version1= 2.06


|version1= 2.05
|branch= diag


|descr=
|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|thumb|350px|See {{Link|#Example 1}} for the code]]
{{Feature|warning|This causes an instant CTD when ''position'' is out of the map! ({{hl|< 0}} and/or {{hl|> [[worldSize]]}})}}
{{Feature|obsolete|This command is subject to be removed and replaced with: [[setTerrainHeight]]|arma3|2.10}}


|gr1= Diagnostic
|gr1= Diagnostic


|s1= [[{{PAGENAMEE}}]]
|s1= position [[diag_setTerrainHeight]] height


|p1= argumentName: [[Type]] - (Optional, default [[defaultValue]]) description
|p1= position: [[Array]] in format [[Position]]


|p2= target: [[Object]] - (Optional, default [[objNull]]) the command's target
|p2= height: [[Number]]


|p3= ↓ to delete if unused ↓
|r1= [[Nothing]]


|p4=  
|x1= <sqf>
private _fnc_flattenTerrain =
{
params ["_start", "_a", "_b", "_h"];


|p5=
for "_xStep" from 0 to _a do
{
for "_yStep" from 0 to _b do
{
_start vectorAdd [_xStep, _yStep, 0] diag_setTerrainHeight _h;
};
};
};


|p6=  
private _desiredTerrainHeight = 150;
[getPosWorld player, 50, 50, _desiredTerrainHeight] spawn _fnc_flattenTerrain;
</sqf>


|p7=
|seealso= [[diag_getTerrainHeight]]
 
|p8=
 
|p9=
 
|p10=
 
|p11=
 
|p12=
 
|p13=
 
|p14=
 
|p15=
 
|p16=
 
|p17=
 
|p18=
 
|p19=
 
|p20=
 
|r1=
 
 
 
|s2=
 
|p21=
 
|p22=
 
|p23=
 
|p24=
 
|p25=
 
|p26=
 
|p27=
 
|p28=
 
|p29=
 
|p30=
 
|p31=
 
|p32=
 
|p33=
 
|p34=
 
|p35=
 
|p36=
 
|p37=
 
|p38=
 
|p39=
 
|p40=
 
|r2=
 
 
 
|s3=
 
|p41=
 
|p42=
 
|p43=
 
|p44=
 
|p45=
 
|p46=
 
|p47=
 
|p48=
 
|p49=
 
|p50=
 
|p51=
 
|p52=
 
|p53=
 
|p54=
 
|p55=
 
|p56=
 
|p57=
 
|p58=
 
|p59=
 
|p60=
 
|r3=
 
 
 
|s4=
 
|p61=
 
|p62=
 
|p63=
 
|p64=
 
|p65=
 
|p66=
 
|p67=
 
|p68=
 
|p69=
 
|p70=
 
|p71=
 
|p72=
 
|p73=
 
|p74=
 
|p75=
 
|p76=
 
|p77=
 
|p78=
 
|p79=
 
|p80=
 
|r4=
 
 
 
|s5=
 
|p81=
 
|p82=
 
|p83=
 
|p84=
 
|p85=
 
|p86=
 
|p87=
 
|p88=
 
|p89=
 
|p90=
 
|p91=
 
|p92=
 
|p93=
 
|p94=
 
|p95=
 
|p96=
 
|p97=
 
|p98=
 
|p99=
 
|p100=
 
|r5=
 
 
 
|x1= <code></code>
 
|x2= <code></code>
 
|x3= <code></code>
 
|x4= <code></code>
 
|x5= <code></code>
 
|x6= <code></code>
 
|x7= <code></code>
 
|x8= <code></code>
 
|x9= <code></code>
 
|x10= <code></code>
 
|seealso= [[seeAlso1]] [[seeAlso2]]
}}
}}

Latest revision as of 17:43, 4 January 2023

Hover & click on the images for description
Only available in Diagnostic branch(es).

Description

Description:
Changes the terrain height of the cell in which given position lies. This command is only available with Arma 3: Diagnostics Exe.
See Example 1 for the code
This causes an instant CTD when position is out of the map! (< 0 and/or > worldSize)
🕖
This information is obsolete as of Arma 3 v2.10. Reason: This command is subject to be removed and replaced with: setTerrainHeight
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