Jump to content
Sign in to follow this  
zombo

How to get Markers moves whit a groups ?

Recommended Posts

HI all i want to get a marker in a group of soldiers so when the group moves the marker too.

Share this post


Link to post
Share on other sites

This may not be entirely what your after, but if you place a high command module on the map and sync it to your character, you should see markers for each grp, unit represented on the map.

otherwise create a marker and use attachto to the unit you want marked.

hope that helps,

Share this post


Link to post
Share on other sites

marker.sqf

null=[_leader,_marker] execvm "marker.sqf";

_unit = _this select 0
_grp = group _unit
_marker = _this select 1

While {true} do
{
_pos = [getpos leader _grp select 0, getpos leader _grp select 1]
_marker setMarkerPosLocal _pos
sleep 1;
};

if(true) exithWith{};

Share this post


Link to post
Share on other sites

can you explain me what do I have to complete in this ?

this goes in my team leader init:

null=[_leader,_marker] execvm "marker.sqf";

this goes in the marker.sqf:

_unit = _this select 0

_grp = group _unit

_marker = _this select 1

While {true} do

{

_pos = [getpos leader _grp select 0, getpos leader _grp select 1]

_marker setMarkerPosLocal _pos

sleep 1;

};

if(true) exithWith{};

my group name is = Alpha

my team leader name is = man1

my marker name is = marker1

Edited by zombo

Share this post


Link to post
Share on other sites
null=[_leader,_marker] execvm "marker.sqf";

Hi zombo,

OK, first of, variables starting with underscore are to be used only in scripts.

So, instead in this should be in the team leader init:

null=[this, markername] execvm "marker.sqf";

Note that you are expected to enter with the RTE a marker on the map that must be called "markername" (without the quotation marks, that is).

So this is sending the variable "this" (which is the name of your leader) and "markername" (which is the name of the marker you placed on the map) to the script called marker.sqf

And in the script the name of the leader is assigned to the variable _unit and the name of the marker is assigned to the variable _marker

I hope you are able to follow how the rest of the script and the variables are handled. :D

I hope this helps. Good Luck!

Splicer.

Share this post


Link to post
Share on other sites

Hmm a few typos and missing semicolins in there, I think should actually look like this?

_unit = _this select 0;
_grp = group _unit;
_marker = _this select 1;

While {true} do
{
_pos = [getpos leader _grp select 0, getpos leader _grp select 1];
_marker setMarkerPosLocal _pos;
sleep 1;
};

if(true) exitWith{};

But doesn't work for me even with these fixes..

Share this post


Link to post
Share on other sites

thy for all help but this isnt working for me

_unit = _this select 0;

_grp = group _unit;

_marker = _this select 1;

While {true} do

{

_pos = [getpos leader _grp select 0, getpos leader _grp select 1];

_marker setMarkerPosLocal _pos;

sleep 1;

};

if(true) exitWith{};

Do I have to complete this with the marker name or the name of my group ? Do I have to complete something ?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×