locationPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.08 | |1.08 | ||
|arg | |arg= | ||
|eff | |eff= | ||
|gr1= Locations | |gr1= Locations | ||
| Returns the [[Position|position]] of a location. If the location is attached to an object, that object's position is returned. | | Returns the [[Position|position]] of a location. If the location is attached to an object, that object's position is returned. | ||
| '''locationPosition''' location | | '''locationPosition''' location | ||
|p1= location: [[Location]] | |p1= location: [[Location]] | ||
| [[Array]] - format [x,y,z], where z is <tt>-1 * [[getTerrainHeightASL]]</tt> at the location | | [[Array]] - format [x,y,z], where z is <tt>-1 * [[getTerrainHeightASL]]</tt> at the location | ||
|x1= <code>_locationPos = [[locationPosition]] myLocation;</code> | |x1= <code>_locationPos = [[locationPosition]] myLocation;</code> | ||
|x2= <code>_location = [[nearestLocation]] [<nowiki/>[[getPos]] [[player]], "nameCity"]; | |x2= <code>_location = [[nearestLocation]] [<nowiki/>[[getPos]] [[player]], "nameCity"]; | ||
_locationPos = [[locationPosition]] _location;</code> | _locationPos = [[locationPosition]] _location;</code> | ||
| [[setPosition]], [[createLocation]], [[nearestLocation]], [[nearestLocations]], [[position]], [[size]] | | [[setPosition]], [[createLocation]], [[nearestLocation]], [[nearestLocations]], [[position]], [[size]] | ||
}} | }} |
Revision as of 01:06, 18 January 2021
Description
- Description:
- Returns the position of a location. If the location is attached to an object, that object's position is returned.
- Groups:
- Locations
Syntax
- Syntax:
- locationPosition location
- Parameters:
- location: Location
- Return Value:
- Array - format [x,y,z], where z is -1 * getTerrainHeightASL at the location
Examples
- Example 1:
_locationPos = locationPosition myLocation;
- Example 2:
_location = nearestLocation [getPos player, "nameCity"]; _locationPos = locationPosition _location;
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