setMarkerPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(75 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.00


|1.00|= Game version
|game2= ofpe
|version2= 1.00


|eff= global |= Effects in MP
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| Moves the marker. If position is given in 3D format, <tt>z</tt> coordinate is stored with the marker and will be used when marker is passed to commands like [[createVehicle]], [[createUnit]], [[createAgent]], [[createMine]], [[setVehiclePosition]] for example. However [[getMarkerPos]] and [[markerPos]] will always return 0 for <tt>z</tt>. |= Description
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| markerName '''setMarkerPos''' pos |= Syntax
|game5= arma2oa
|version5= 1.50


|p1= markerName: [[String]] |= Parameter 1
|game6= tkoh
|p2= pos: [[Array]] - format [[Position2D]] or [[PositionAGL]] |= Parameter 2
|version6= 1.00


| [[Nothing]] |= Return value
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50
 
|x1= <code>"MarkerOne" '''setMarkerPos''' [[getMarkerPos]] "MarkerTwo"</code> |= Example 1
____________________________________________________________________________________________


|[[setMarkerBrush]], [[setMarkerColor]], [[setMarkerDir]], [[createMarker]], [[setMarkerShape]], [[setMarkerSize]], [[setMarkerText]], [[setMarkerType]], [[setMarkerAlpha]]
|gr1= Markers
|= See also


|eff= global
|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. In case of an object, the object's model [0,0,0] 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).
}}
}}


<h3 style="display:none">Notes</h3>
|s1= markerName [[setMarkerPos]] position
<dl class="command_description">
<!-- Note Section BEGIN -->


<dt class="note">[[User:Pulverizer|Pulverizer]]
|p1= markerName: [[String]]
<dd class="note">Effect is local in OFP.


<dd class="notedate">Posted on March 31, 2008 - 22:25 (CEST)
|p2= position: [[Array]] format [[Position#Introduction|Position2D]] or [[Position#PositionAGL|PositionAGL]] or {{GVI|arma3|1.94|size= 0.75}} [[Object]]. In case of an object, the object's model [0,0,0] is used.
<dt class="note">[[User:Doolittle|Doolittle]]
|r1= [[Nothing]]
<dd class="note">This command will not move a marker on dedicated server (if a client calls it). AI will continue to respawn at old spot if you are moving something like respawn_west.


<dd class="notedate">Posted on August 7, 2009 - 02:03 (CEST)
|x1= <sqf>"MarkerOne" setMarkerPos getMarkerPos "MarkerTwo";</sqf>
<dt class="note">[[User:Dr Eyeball|Dr Eyeball]]
<dd class="note">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 -->


<!-- Note Section END -->
|seealso= [[setMarkerPosLocal]] [[setMarkerBrush]] [[setMarkerColor]] [[setMarkerDir]] [[createMarker]] [[setMarkerShape]] [[setMarkerSize]] [[setMarkerText]] [[setMarkerType]] [[setMarkerAlpha]]
</dl>
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
[[Category:Scripting Commands|SETMARKERPOS]]
|user= Pulverizer
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
|timestamp= 20070323234700
[[Category:Scripting Commands OFP 1.96|SETMARKERPOS]]
|text= Effect is local in OFP.
[[Category:Scripting Commands OFP 1.46|SETMARKERPOS]]
|game= ofp
[[Category:Scripting Commands ArmA|SETMARKERPOS]]
}}
[[Category:Command Group: Markers|SETMARKERPOS]]
 
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
{{Note
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|user= Dr Eyeball
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
|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.
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 11:56, 1 November 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. In case of an object, the object's model [0,0,0] 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 position
Parameters:
markerName: String
position: Array format Position2D or PositionAGL or Arma 3 logo black.png1.94 Object. In case of an object, the object's model [0,0,0] is used.
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