setPosASL: 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 - " |r1=[[" to " |r1= [[")
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command


| arma1 |Game name=
|game1= ofpe
|version1= 1.00


|1.00|Game version=
|game2= ofp
|version2= 1.99


|game2= ofp |Game2 name=
|game3= arma1
|version3= 1.00


|version2= 1.99 |Game2 version=
|game4= arma2
|version4= 1.00


|arg= global |Multiplayer Arguments=
|game5= arma2oa
|version5= 1.50


|eff= global |Multiplayer Effects=
|game6= tkoh
|version6= 1.00


|gr1= Positions |GROUP1=
|game7= arma3
|version7= 0.50


| Sets the object position above sea level. Given position must be in [[PositionASL]] format. |DESCRIPTION=
|arg= global


| object [[setPosASL]] pos |SYNTAX=
|eff= global


|p1= object: [[Object]] |PARAMETER1=
|gr1= Positions


|p2= pos: [[Array]] - format [[PositionASL]] |PARAMETER2=
|descr= Sets the object position above sea level. Given position must be in [[PositionASL]] format.


| [[Nothing]] |RETURNVALUE=
|s1= object [[setPosASL]] pos
 
|x1= <code>[[player]] [[setPosASL]] [<nowiki/>[[getPosASL]] [[player]] [[select]] 0, ([[getPosASL]] [[player]] [[select]] 1) + 10, [[getPosASL]] [[player]] [[select]] 2];</code> |EXAMPLE1=


|x2= <code>[[this]] [[setPosASL]] [<nowiki/>[[position]] [[this]] [[select]] 0, [[position]] [[this]] [[select]] 1, 9];  {{cc|[ X, Y, Z]}}</code> |EXAMPLE2=
|p1= object: [[Object]]


| [[ASLToATL]], [[ATLToASL]], [[getPos]], [[getPosASL]], [[getPosATL]], [[position]], [[setPos]], [[setPosASL2]], [[setPosATL]], [[getTerrainHeightASL]], [[setPosWorld]], [[setVehiclePosition]] |SEEALSO=
|p2= pos: [[Array]] - format [[PositionASL]]
 
|r1= [[Nothing]]
 
|x1= <code>[[player]] [[setPosASL]] [<nowiki/>[[getPosASL]] [[player]] [[select]] 0, ([[getPosASL]] [[player]] [[select]] 1) + 10, [[getPosASL]] [[player]] [[select]] 2];</code>
 
|x2= <code>[[Magic Variables#this_2|this]] [[setPosASL]] [<nowiki/>[[position]] [[Magic Variables#this_2|this]] [[select]] 0, [[position]] [[Magic Variables#this_2|this]] [[select]] 1, 9];  {{cc|[ X, Y, Z]}}</code>
 
|seealso= [[ASLToATL]], [[ATLToASL]], [[getPos]], [[getPosASL]], [[getPosATL]], [[position]], [[setPos]], [[setPosASL2]], [[setPosATL]], [[getTerrainHeightASL]], [[setPosWorld]], [[setVehiclePosition]]
}}
}}
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
{{GameCategory|ofpe|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Revision as of 00:49, 8 August 2021

Hover & click on the images for description

Description

Description:
Sets the object position above sea level. Given position must be in PositionASL format.
Groups:
Positions

Syntax

Syntax:
object setPosASL pos
Parameters:
object: Object
pos: Array - format PositionASL
Return Value:
Nothing

Examples

Example 1:
player setPosASL [getPosASL player select 0, (getPosASL player select 1) + 10, getPosASL player select 2];
Example 2:
this setPosASL [position this select 0, position this select 1, 9]; // [ X, Y, Z]

Additional Information

See also:
ASLToATLATLToASLgetPosgetPosASLgetPosATLpositionsetPossetPosASL2setPosATLgetTerrainHeightASLsetPosWorldsetVehiclePosition

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