BIS fnc setHeight: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix return value for alternative syntax) |
m (template:command argument fix) |
||
Line 8: | Line 8: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Set an object height. |= | | Set an object height. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [target, height, position, mode] call [[BIS_fnc_setHeight]] |= | | [target, height, position, mode] call [[BIS_fnc_setHeight]] |SYNTAX= | ||
|p1= target: [[Object]] - affected object |= | |p1= target: [[Object]] - affected object |PARAMETER1= | ||
|p2= height: [[Number]] - (Optional, default 0) height to set |= | |p2= height: [[Number]] - (Optional, default 0) height to set |PARAMETER2= | ||
|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 |PARAMETER3= | ||
|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]] |PARAMETER4= | ||
| [[Boolean]] - [[true]] when done |= | | [[Boolean]] - [[true]] when done |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 30: | Line 30: | ||
{{note|Alternative Syntax uses {{Inline code|[[this]]}} and {{Inline code|[[position]] [[this]]}}; this shortened syntax is to be used in init fields.}} |= Alternative Syntax | {{note|Alternative Syntax uses {{Inline code|[[this]]}} and {{Inline code|[[position]] [[this]]}}; this shortened syntax is to be used in init fields.}} |= Alternative Syntax | ||
|p21= height: [[Number]] - (Optional, default 0) height to set |= | |p21= height: [[Number]] - (Optional, default 0) height to set |PARAMETER1= | ||
|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]] |PARAMETER2= | ||
|r2= [[Boolean]] - [[true]] when done |= | |r2= [[Boolean]] - [[true]] when done |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>{{codecomment|// will place player's vehicle on "myHeightMarker", 50m above terrain}} | |x1= <code>{{codecomment|// will place player's vehicle on "myHeightMarker", 50m above terrain}} | ||
<nowiki>[</nowiki>[[vehicle]] [[player]], 50, [[getMarkerPos]] "myHeightMarker", "ATL"]]] [[call]] [[BIS_fnc_setHeight]];</code> |= | <nowiki>[</nowiki>[[vehicle]] [[player]], 50, [[getMarkerPos]] "myHeightMarker", "ATL"]]] [[call]] [[BIS_fnc_setHeight]];</code> |EXAMPLE1= | ||
|x2= <code>{{codecomment|// will set the ''this'' object 50m above sea level at its position | |x2= <code>{{codecomment|// 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]];</code> |EXAMPLE2= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[setPos]], [[setPosASL]], [[setPosATL]] |= | | [[setPos]], [[setPosASL]], [[setPosATL]] |SEEALSO= | ||
}} | }} | ||
Revision as of 14:33, 7 April 2019
Description
- Description:
- Set an object height.
- Execution:
- call
- Groups:
- Uncategorised
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 Template:note
- 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