setMarkerPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Remove PositionWorld)
m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|")
 
(7 intermediate revisions by the same user not shown)
Line 27: Line 27:


|descr= Moves the marker. If position is given in 3D format, {{hl|z}} coordinate is stored with the marker and will be used when marker is passed to commands like [[createVehicle]], [[createUnit]], [[createAgent]], [[createMine]], [[setVehiclePosition]] for example. When [[Object]] is used for position, its [[getPosWorld]] is used.
|descr= Moves the marker. If position is given in 3D format, {{hl|z}} coordinate is stored with the marker and will be used when marker is passed to commands like [[createVehicle]], [[createUnit]], [[createAgent]], [[createMine]], [[setVehiclePosition]] for example. When [[Object]] is used for position, its [[getPosWorld]] is used.
{{Feature|Informative|'''Multiplayer optimisation:''' Global marker commands always broadcast the ''entire'' marker state over the network. As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).}}
{{Feature|informative|'''Multiplayer optimisation:''' Global marker commands always broadcast the ''entire'' marker state over the network. As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).}}


|s1= markerName [[setMarkerPos]] pos
|s1= markerName [[setMarkerPos]] pos
Line 33: Line 33:
|p1= markerName: [[String]]
|p1= markerName: [[String]]


|p2= pos: [[Array]] format [[Position#Introduction|Position2D]] or [[Position#PositionAGL|PositionAGL]] or {{GVI|arma3|1.94|size=0.75}} [[Object]] - object's '''model centre'''<nowiki/>'s position will be used (see [[getPosWorld]])
|p2= pos: [[Array]] format [[Position#Introduction|Position2D]] or [[Position#PositionAGL|PositionAGL]] or {{GVI|arma3|1.94|size= 0.75}} [[Object]] - object's '''model centre'''<nowiki/>'s position is used (see [[getPosWorld]])


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>"MarkerOne" [[setMarkerPos]] [[getMarkerPos]] "MarkerTwo"</code>
|x1= <sqf>"MarkerOne" setMarkerPos getMarkerPos "MarkerTwo";</sqf>


|seealso= [[setMarkerPosLocal]] [[setMarkerBrush]] [[setMarkerColor]] [[setMarkerDir]] [[createMarker]] [[setMarkerShape]] [[setMarkerSize]] [[setMarkerText]] [[setMarkerType]] [[setMarkerAlpha]]
|seealso= [[setMarkerPosLocal]] [[setMarkerBrush]] [[setMarkerColor]] [[setMarkerDir]] [[createMarker]] [[setMarkerShape]] [[setMarkerSize]] [[setMarkerText]] [[setMarkerType]] [[setMarkerAlpha]]
Line 53: Line 53:
|timestamp= 20090807020300
|timestamp= 20090807020300
|text= The marker position can actually be set in 3D. This has a benefit for respawn markers, when placed at the correct altitude ASL on the LHD, the correct altitude will be used for respawn.
|text= The marker position can actually be set in 3D. This has a benefit for respawn markers, when placed at the correct altitude ASL on the LHD, the correct altitude will be used for respawn.
There is no particular benefit for regular markers since [[markerPos]] will still return 0 for the altitude array element. {{cc|Tip obtained from Xeno}}
There is no particular benefit for regular markers since [[markerPos]] will still return 0 for the altitude array element. // Tip obtained from Xeno
}}
}}

Latest revision as of 01:26, 2 February 2024

Hover & click on the images for description

Description

Description:
Moves the marker. If position is given in 3D format, z coordinate is stored with the marker and will be used when marker is passed to commands like createVehicle, createUnit, createAgent, createMine, setVehiclePosition for example. When Object is used for position, its getPosWorld is used.
Multiplayer optimisation: Global marker commands always broadcast the entire marker state over the network. As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).
Groups:
Markers

Syntax

Syntax:
markerName setMarkerPos pos
Parameters:
markerName: String
pos: Array format Position2D or PositionAGL or Arma 3 logo black.png1.94 Object - object's model centre's position is used (see getPosWorld)
Return Value:
Nothing

Examples

Example 1:
"MarkerOne" setMarkerPos getMarkerPos "MarkerTwo";

Additional Information

See also:
setMarkerPosLocal setMarkerBrush setMarkerColor setMarkerDir createMarker setMarkerShape setMarkerSize setMarkerText setMarkerType setMarkerAlpha

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
Pulverizer - c
Posted on Mar 23, 2007 - 23:47 (UTC)

Effect is local in OFP.

Dr Eyeball - c
Posted on Aug 07, 2009 - 02:03 (UTC)
The marker position can actually be set in 3D. This has a benefit for respawn markers, when placed at the correct altitude ASL on the LHD, the correct altitude will be used for respawn. There is no particular benefit for regular markers since markerPos will still return 0 for the altitude array element. // Tip obtained from Xeno