BIS fnc setHeight: Difference between revisions
Jump to navigation
Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki) |
m (Example syntax fix) |
||
(47 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | |||
|game1= tkoh | |||
|version1= 1.00 | |||
| | |game2= arma3 | ||
|version2= 0.50 | |||
| | |gr1= Object Manipulation | ||
| | |descr= Set an object's altitude. | ||
|s1= [target, height, position, mode] call [[BIS_fnc_setHeight]] | |||
|p1= target: [[Object]] - affected object | |||
|p2= height: [[Number]] - (Optional, default 0) height to set | |||
|p3= position: [[Position]] - (Optional, default <sqf inline>position target</sqf>) position to place the target with calculated height | |||
|p4= mode: [[String]] - (Optional, default "ROADWAY") can be: | |||
* "ROADWAY": uses [[setPos]] | |||
* | * "ASL": uses [[setPosASL]] | ||
* "ATL": uses [[setPosATL]] | |||
|r1= [[Boolean]] - [[true]] when done | |||
| | |s2= [height, mode] call [[BIS_fnc_setHeight]] | ||
{{Feature|important|This syntax uses <sqf inline>this</sqf> 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 | ||
| | |p22= mode: [[String]] - (Optional, default "ROADWAY") can be: | ||
* "ROADWAY": uses [[setPos]] | |||
* "ASL": uses [[setPosASL]] | |||
* "ATL": uses [[setPosATL]] | |||
| | |r2= [[Boolean]] - [[true]] when done | ||
| | |x1= <sqf> | ||
// will place player's vehicle on "myHeightMarker", 50m above terrain | |||
[vehicle player, 50, getMarkerPos "myHeightMarker", "ATL"] call BIS_fnc_setHeight; | |||
</sqf> | |||
|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 | |||
[50, "ASL"] call BIS_fnc_setHeight; | |||
</sqf> | |||
|seealso= [[setPos]] [[setPosASL]] [[setPosATL]] | |||
}} | }} | ||
Latest revision as of 23:41, 13 November 2023
Description
- Description:
- Set an object's altitude.
- 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
- 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
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