Jump to content
Sign in to follow this  
Zehtuka

flagOwner marking question

Recommended Posts

Hey all,

While trying to learn more about the editor I ran into the following problem:

Player X is the flagOwner red_flag after doing a certain action. Now I would like to have Player X appear on the map with a marker that updates as this player moves around. After searching around I found this script:

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

while{alive _unit}do{
_marker setMarkerPos (getPos _unit);
_sleeptime = 1;
sleep _sleeptime;
};

You call this function using:

dummy = [general,"marker"] execVM "marker.sqf";

Where of course "general" is the name of the unit which needs to be marked on the map. Marker refers to the name of a marker already created on the map. The code works great but I would like to know how to "assign" it to the flagOwner red_flag, which can be picked up by anybody on the team. Thanks in advance if somebody can give me some tips regarding this issue. :o

Share this post


Link to post
Share on other sites

I don't understand the problem,

dummy = [flagOwner red_flag,"marker"] execVM "marker.sqf";

should work, have you tried it?

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  

×