BIS fnc setHeight: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "= <code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-_]+)\]\]([^<]*)<\/code>" to "= <code>$1$2$3</code>")
m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>")
Line 38: Line 38:
|r2= [[Boolean]] - [[true]] when done
|r2= [[Boolean]] - [[true]] when done


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


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


|seealso= [[setPos]] [[setPosASL]] [[setPosATL]]
|seealso= [[setPos]] [[setPosASL]] [[setPosATL]]
}}
}}

Revision as of 17:00, 13 July 2022

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:
setPos setPosASL setPosATL

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