BIS fnc setHeight: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| tkoh |Game name=
| tkoh


|1.00|Game version=
|1.00


|gr1 = Object Manipulation |GROUP1=
|gr1 = Object Manipulation


| Set an object height. |DESCRIPTION=
| Set an object height.


| [target, height, position, mode] call [[BIS_fnc_setHeight]] |SYNTAX=
| [target, height, position, mode] call [[BIS_fnc_setHeight]]


|p1= target: [[Object]] - affected object |PARAMETER1=
|p1= target: [[Object]] - affected object


|p2= height: [[Number]] - (Optional, default 0) height to set |PARAMETER2=
|p2= height: [[Number]] - (Optional, default 0) height to set


|p3= position: [[Position]] - (Optional, default [[position]] ''target'') position to place the target with calculated height |PARAMETER3=
|p3= position: [[Position]] - (Optional, default [[position]] ''target'') position to place the target with calculated height


|p4= mode: [[String]] - (Optional, default "ROADWAY") can be:
|p4= mode: [[String]] - (Optional, default "ROADWAY") can be:
* "ROADWAY": uses [[setPos]]
* "ROADWAY": uses [[setPos]]
* "ASL": uses [[setPosASL]]
* "ASL": uses [[setPosASL]]
* "ATL": uses [[setPosATL]] |PARAMETER4=
* "ATL": uses [[setPosATL]]


| [[Boolean]] - [[true]] when done |RETURNVALUE=
| [[Boolean]] - [[true]] when done


|s2= [height, mode] call [[BIS_fnc_setHeight]]
|s2= [height, mode] call [[BIS_fnc_setHeight]]
{{Important | This syntax uses {{Inline code|[[this]]}} and is therefore meant to be used in init fields. Not to be used in MP.}} |SYNTAX2=
{{Important | This syntax uses {{Inline code|[[this]]}} and is therefore meant to be used in init fields. Not to be used in MP.}}


|p21= height: [[Number]] - (Optional, default 0) height to set |PARAMETER21=
|p21= height: [[Number]] - (Optional, default 0) height to set |PARAMETER21=
Line 34: Line 34:
* "ATL": uses [[setPosATL]] |PARAMETER22=
* "ATL": uses [[setPosATL]] |PARAMETER22=


|r2= [[Boolean]] - [[true]] when done |RETURNVALUE2=
|r2= [[Boolean]] - [[true]] when done


|x1= <code>{{cc|will place player's vehicle on "myHeightMarker", 50m above terrain}}
|x1= <code>{{cc|will place player's vehicle on "myHeightMarker", 50m above terrain}}
[<nowiki/>[[vehicle]] [[player]], 50, [[getMarkerPos]] "myHeightMarker", "ATL"]]] [[call]] [[BIS_fnc_setHeight]];</code> |EXAMPLE1=
[<nowiki/>[[vehicle]] [[player]], 50, [[getMarkerPos]] "myHeightMarker", "ATL"]]] [[call]] [[BIS_fnc_setHeight]];</code>


|x2= <code>{{cc|will set the ''this'' object 50m above sea level at its position}}
|x2= <code>{{cc|will set the ''this'' object 50m above sea level at its position}}
{{cc|use where '''this''' has a value like in an init field}}
{{cc|use where '''this''' has a value like in an init field}}
[50, "ASL"] [[call]] [[BIS_fnc_setHeight]];</code> |EXAMPLE2=
[50, "ASL"] [[call]] [[BIS_fnc_setHeight]];</code>


| [[setPos]], [[setPosASL]], [[setPosATL]] |SEEALSO=
| [[setPos]], [[setPosASL]], [[setPosATL]]
}}
}}


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:{{Name|arma3}}: Functions|{{uc:setHeight}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:setHeight}}]]

Revision as of 23:44, 17 January 2021

Hover & click on the images for description

Description

Description:
Set an object height.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
[target, height, position, mode] call BIS_fnc_setHeight
Parameters:
target: Object - affected object
height: Number - (Optional, default 0) height to set
position: Position - (Optional, default position target) position to place the target with calculated height
mode: String - (Optional, default "ROADWAY") can be:
Return Value:
Boolean - true when done

Alternative Syntax

Syntax:
[height, mode] call BIS_fnc_setHeight
This syntax uses this and is therefore meant to be used in init fields. Not to be used in MP.
Parameters:
height: Number - (Optional, default 0) height to set
mode: String - (Optional, default "ROADWAY") can be:
Return Value:
Boolean - true when done

Examples

Example 1:
// will place player's vehicle on "myHeightMarker", 50m above terrain [vehicle player, 50, getMarkerPos "myHeightMarker", "ATL"]]] call BIS_fnc_setHeight;
Example 2:
// will set the this object 50m above sea level at its position // use where this has a value like in an init field [50, "ASL"] call BIS_fnc_setHeight;

Additional Information

See also:
setPossetPosASLsetPosATL

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

Bottom Section