kiberkiller 10 Posted July 22, 2013 Hello BIS forum, I'm trying to make my first mission in ARMA 3. So far it went decently and I was able to find all the answers on the excellent wiki but I stumbled upon a problem that I can't find any solution for. I'm making a multiplayer mission and I want to move a marker to one special OPFOR player position, every time every time BLUFOR activates a trigger. I have figured out everything except for how to get an "object" if all I've got a the unit name, of that OPFOR player. How would I do that? I would prefer a way to do that without external scripting, if possible. Thanks in advance. Share this post Link to post Share on other sites
froggyluv 2130 Posted July 22, 2013 I'm not sure I totally follow but if you need only one named unit to fire a trigger it would be Opfor Present Condition box: This and Barney in thislist -with Barney being the name of the unit Share this post Link to post Share on other sites
kiberkiller 10 Posted July 22, 2013 That's not really what I need. I want to move a marker to UnitX's position when a trigger is activated. How would I do that? Share this post Link to post Share on other sites
IndeedPete 1038 Posted July 22, 2013 "marker" setMarkerPos [(getPos Barney select 0), (getPos Barney select 1)]; Share this post Link to post Share on other sites
kiberkiller 10 Posted July 22, 2013 "marker" setMarkerPos [(getPos Barney select 0), (getPos Barney select 1)]; Thanks but what does "select 0" and "select 1" actually do? Why wouldn't "marker" setMarkerPos [getPos Barney]; work? Share this post Link to post Share on other sites
UNDERDAOATH 10 Posted July 22, 2013 (edited) Markers only need x and y. Positions are arrays of x y and z. Also "marker" setMarkerPos [getPos Barney]; Would have been incorrect anyways since you're putting an array inside of an array. select x will select the element at index x in the array. Also to get a unit by name _name = "Barney"; _player = objNull; _i = 0; _max = count allUnits; while { _i < _max } do { if(isPlayer (allUnits select _i)) then { if(name (allUnits select _i) == _name) then { _player = allUnits select _i; }; }; _i = _i + 1; }; if(isNull _player) then { //error handling }; Edited July 22, 2013 by UNDERDAOATH Share this post Link to post Share on other sites
nimrod_z 8 Posted July 22, 2013 (edited) Thanks but what does "select 0" and "select 1" actually do? Why wouldn't "marker" setMarkerPos [getPos Barney]; work? "marker" setMarkerPos (getPosATL barney); the select 012 that you can specify if you want are the positions in 3d. this comes in handy if you need a marker, like say a respawn marker to be a specific height to spawn guys on the deck of the lhd carrier instead of in the sea at ground level. Edited July 22, 2013 by Nimrod_Z Share this post Link to post Share on other sites
Woodpeckersam 18 Posted July 22, 2013 (edited) "marker" setMarkerPos [(getPos Barney select 0), (getPos Barney select 1)]; Explanation: "marker" : this is the name of the marker you created on the map setMarkerPos : this will set the position of the marker to Barney getPos : gets the position of whatever unit/object you have specified in this case it is Barney. select 0 or select 1 or select 2: you use the select command followed by a number to grab the index. The index 0 of getPos is X = Length The index 1 of getPos is Y = Depth The index 2 of getPos is Z = Height getPos Barney select 0 : This is getting the X coordinate of where Barney is standing getPos Barney select 1 : This is getting the Y coordinate of where Barney is standing "marker" setMarkerPos [(getPos Barney select 0), (getPos Barney select 1)]; This is basically saying move the marker called "marker" to the X and Y position of where Barney is standing. You will see the marker on the map. But you dont really need all that. It doesnt matter how high a marker is if you just want to the marker to be placed at the position of a unit/object. It makes no difference. So just use this. "marker" setMarkerPos (getPos Barney); Since you are not specifying any indexes it will place the marker at the same X Y Z position of Barney. This post is merely there to help explain. Not help figure out the issue at hand. Edited July 22, 2013 by ArmASalt3 Share this post Link to post Share on other sites
kiberkiller 10 Posted July 22, 2013 Thanks a lot, guys. You've been a huge help! Share this post Link to post Share on other sites