setPosATL: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\<dt class\=\"note\"\>\'\'\'\[\[(.*)\]\]\'\'\'" to "<dt class="note">$1")
m (Text replacement - "\|x([0-9]) *= * <code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(47 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.03


|1.03|Game version=
|game2= arma2oa
|version2= 1.50


|arg= global |Multiplayer Arguments=
|game3= tkoh
|version3= 1.00


|eff= global |Multiplayer Effects=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Sets the position of an object relative to the terrain. |DESCRIPTION=
|arg= global
____________________________________________________________________________________________


| object '''setPosATL''' pos |SYNTAX=
|eff= global


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


|p2= pos: [[Array]] - format [[PositionATL]] |PARAMETER2=
|descr= Sets the position of an object relative to the terrain.


| [[Nothing]] |RETURNVALUE=
|s1= object [[setPosATL]] pos
____________________________________________________________________________________________


|x1= <code>[[player]] [[setPosATL]] [<nowiki/>[[getPosATL]] [[player]] [[select]] 0, ([[getPosATL]] [[player]] [[select]] 1) - 10, [[getPosATL]] [[player]] [[select]] 2];</code> |EXAMPLE1=
|p1= object: [[Object]]
____________________________________________________________________________________________


| [[getPosATL]], [[getPos]], [[getPosASL]], [[setPos]], [[setPosASL]] |SEEALSO=
|p2= pos: [[Array]] - format [[Position#PositionATL|PositionATL]]
 
|r1= [[Nothing]]
 
|x1= <sqf>player setPosATL [getPosATL player select 0, (getPosATL player select 1) - 10, getPosATL player select 2];</sqf>
 
|seealso= [[getPosATL]] [[getPos]] [[getPosASL]] [[setPos]] [[setPosASL]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Feb 26, 2012 - 18:12 (CEST)
<dt class="note">[[User:Lou Montana|Lou Montana]]
<dd class="note"> '''Please Note :''' this command '''demands''' [[PositionATL]] format ; one does not simply give 2D position, as this function won't do anything.
<!-- Note Section END -->
</dl>


<dt></dt>
<dd class="notedate">Posted on Feb 26, 2012 - 18:12 (CEST)</dd>
<dt class="note">[[User:Lou Montana|Lou Montana]]</dt>
<dd class="note"> '''Please Note :''' this command '''demands''' [[Position#PositionATL|PositionATL]] format ; one does not simply give 2D position, as this function won't do anything.


[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
<dt></dt>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on November 11, 2014 - 20:39 (UTC)</dd>
<dd class="notedate">Posted on November 11, 2014 - 20:39 (UTC)</dd>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
Line 51: Line 47:
If you plan on creating bases through script, [[setPosATL]] and [[getPosATL]] will be your friends. Other commands like [[getPos]] or [[getPosASL]] '''will''' return the position relative to any objects that are underneath. I wrote a base building helper script and through multiple tests, I have found that [[getPosATL]] is the absolute best way to get position for objects that are over land.
If you plan on creating bases through script, [[setPosATL]] and [[getPosATL]] will be your friends. Other commands like [[getPos]] or [[getPosASL]] '''will''' return the position relative to any objects that are underneath. I wrote a base building helper script and through multiple tests, I have found that [[getPosATL]] is the absolute best way to get position for objects that are over land.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 11:38, 13 May 2022

Hover & click on the images for description

Description

Description:
Sets the position of an object relative to the terrain.
Groups:
Positions

Syntax

Syntax:
object setPosATL pos
Parameters:
object: Object
pos: Array - format PositionATL
Return Value:
Nothing

Examples

Example 1:

Additional Information

See also:
getPosATL getPos getPosASL setPos setPosASL

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
Posted on Feb 26, 2012 - 18:12 (CEST)
Lou Montana
Please Note : this command demands PositionATL format ; one does not simply give 2D position, as this function won't do anything.
Posted on November 11, 2014 - 20:39 (UTC)
DreadedEntity
If you plan on creating bases through script, setPosATL and getPosATL will be your friends. Other commands like getPos or getPosASL will return the position relative to any objects that are underneath. I wrote a base building helper script and through multiple tests, I have found that getPosATL is the absolute best way to get position for objects that are over land.