Jump to content
  • 0

Dynamic Trader Marker


Airwaves Man

Question

Hello folks,

I have difficulties with the map markers for my traders. The traders spawn random every restart on five different locations. When I joined my server directly after restart, the mapamerks to the current trader loaction is on the map but when I relog or I join 30min after restart, there is no mapmarker for the trader on the map. So the marker just disappear but the traders are still there. My traders are serverside.

Thats my code for the mapmarker.

Can someone help me out?

_unit_2 = objNull;
if (true) then
{
 _this = createAgent ["gsc_military_head_grey", [11604.31, 11765.723, -4.5776367e-005], [], 0, "CAN_COLLIDE"];
  {_this removeMagazine _x;} count  magazines _this;
  removeAllWeapons _this;
  _this switchMove "";
  _unit_2 = _this;
  _this setDir -40.380417;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};


_this = createMarker ["blackmarket", [11596.525, 11768.809, 0]];
_this setMarkerText "Black Market";
_this setMarkerType "Dot";
_this setMarkerColor "ColorBlack";
_this setMarkerBrush "Solid";

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Spoiler

_unit_2 = objNull;
if (true) then
{
 _this = createAgent ["gsc_military_head_grey", [11604.31, 11765.723, -4.5776367e-005], [], 0, "CAN_COLLIDE"];
  {_this removeMagazine _x;} count  magazines _this;
  removeAllWeapons _this;
  _this switchMove "";
  _this setVehicleVarName "trader";
  trader = _this;
  _this setDir -40.380417;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _this setVehicleInit "deleteopfor attachTo[trader,[0,0,0]];";
  trader addEventHandler ["handleDamage", {false}];
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};
 
  /////////////////////////////////////marker
_this = createMarker ["marker-follow-trader", [11604.31, 11765.723, -4.5776367e-005]];
_this setMarkerText "trader";
_this setMarkerShape "ELLIPSE";
_this setMarkerType "mil_box";
_this setMarkerColor "ColorBlue";
_this setMarkerBrush "Solid";
_this setMarkerSize [50, 50];
_marker_0 = _this;

///////////////////////////////trigger
_this = createTrigger ["EmptyDetector", [11604.31, 11765.723, -4.5776367e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["EAST", "PRESENT", true];
_this setTriggerTimeout [10, 10, 10, false];
_this setTriggerStatements ["this AND (getPosATL (vehicle player) select 2) < 3;", "{deleteVehicle _x} forEach thisList;", ""];
deleteopfor = _this;
_trigger_0 = _this;

//end of marker and trigger

try whit my trader_in_move  marker.   i add handdledamage to your unit cuz allowdamage dsnt work on multiplayer, just in local.

Spoiler

while {true} do
{
"marker-follow-trader" setmarkerpos (getpos trader);
sleep 1;
};

make and sqf and paste it inside.  call dinamicmarker.sqf

go to your init.sqf

[] execVM "Yourpath\dinamicmarker.sqf";

Link to comment
Share on other sites

  • 0
On ‎26‎-‎3‎-‎2016 at 1:57 AM, A Man said:

That does not work for me. When I call it I have dublicated Traders.

 

Use the one there its maca's dynamic traders i use it to markers Always show up .

You can edit the traders really easy .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...