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...")
 
(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= 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 ↓
|x1= <code>[[private]] _fnc_flattenTerrain [[a = b|=]]
{
  [[params]] ["_start", "_a", "_b", "_h"];


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


|p5=
<nowiki>[</nowiki>[[position]] [[player]], 50, 50, 150] [[spawn]] _fnc_flattenTer[[rain]];</code>


|p6=
|seealso=
 
|p7=
 
|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]]
}}
}}

Revision as of 11:40, 26 April 2021

-wrong parameter ("arma3diag") defined!-[[:Category:Introduced with arma3diag version 2.05|2.05]]
Hover & click on the images for description

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
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]]