setPosATL: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= ([^' ]+)'''([^' ]+)'''([^ ]*) " to "|s$1= $2$3$4 ") |
||
Line 21: | Line 21: | ||
|descr= Sets the position of an object relative to the terrain. | |descr= Sets the position of an object relative to the terrain. | ||
|s1= object | |s1= object [[setPosATL]] pos | ||
|p1= object: [[Object]] | |p1= object: [[Object]] |
Revision as of 18:09, 20 June 2021
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:
player setPosATL [getPosATL player select 0, (getPosATL player select 1) - 10, getPosATL player select 2];
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
- 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.