BIS fnc setHeight: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Remove note template usage) |
m (Text replacement - "{{Inline code|" to "{{ic|") |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| tkoh | | tkoh | ||
|1.00 | |1.00 | ||
|gr1 = Object Manipulation | |gr1 = Object Manipulation | ||
| Set an object height. | | Set an object height. | ||
| [target, height, position, mode] call [[BIS_fnc_setHeight]] | | [target, height, position, mode] call [[BIS_fnc_setHeight]] | ||
|p1= target: [[Object]] - affected object | |p1= target: [[Object]] - affected object | ||
|p2= height: [[Number]] - (Optional, default 0) height to set | |p2= height: [[Number]] - (Optional, default 0) height to set | ||
|p3= position: [[Position]] - (Optional, default [[position]] ''target'') position to place the target with calculated height | |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]] | * "ATL": uses [[setPosATL]] | ||
| [[Boolean]] - [[true]] when done | | [[Boolean]] - [[true]] when done | ||
|s2= [height, mode] call [[BIS_fnc_setHeight]] | |s2= [height, mode] call [[BIS_fnc_setHeight]] | ||
{{ | {{Feature | important | This syntax uses {{ic|[[Magic Variables#this_2|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 | |p21= height: [[Number]] - (Optional, default 0) height to set | ||
|p22= mode: [[String]] - (Optional, default "ROADWAY") can be: | |p22= mode: [[String]] - (Optional, default "ROADWAY") can be: | ||
* "ROADWAY": uses [[setPos]] | * "ROADWAY": uses [[setPos]] | ||
* "ASL": uses [[setPosASL]] | * "ASL": uses [[setPosASL]] | ||
* "ATL": uses [[setPosATL]] | * "ATL": uses [[setPosATL]] | ||
|r2= [[Boolean]] - [[true]] when done | |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> | [<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> | [50, "ASL"] [[call]] [[BIS_fnc_setHeight]];</code> | ||
| [[setPos]], [[setPosASL]], [[setPosATL]] | |seealso= [[setPos]], [[setPosASL]], [[setPosATL]] | ||
}} | }} | ||
[[Category:{{Name|arma3}}: Functions|{{uc:setHeight}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:setHeight}}]] |
Revision as of 18:10, 27 February 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- 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:
- Return value needed
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