Jump to content
  • 0

How to change trader spawn locations


sampson42002

Question

Hello, I have searched for this and have not found what I looking for, maybe i'm blind.  I have a PvE overpoch server, and since there is no need for a bandit trader I got rid of him.  I had a friend helping me around the start of this year and he used server files from his old server and merged them with mine.  At the bandit traders original location his files added other trader's and some other stuff.  The traders there are not used so I turned one into a superhero trader.  I got all of that working. 

Problem is if you buy a heli from him it spawns in right by him and there is a building and some other thing.  How do I change where the items spawn in at for that trader?

 

Thanks mike

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
On 22/10/2016 at 4:14 PM, sampson42002 said:

Hello, I have searched for this and have not found what I looking for, maybe i'm blind.  I have a PvE overpoch server, and since there is no need for a bandit trader I got rid of him.  I had a friend helping me around the start of this year and he used server files from his old server and merged them with mine.  At the bandit traders original location his files added other trader's and some other stuff.  The traders there are not used so I turned one into a superhero trader.  I got all of that working. 

Problem is if you buy a heli from him it spawns in right by him and there is a building and some other thing.  How do I change where the items spawn in at for that trader?

 

Thanks mike

vehicle spawn in traders:

first go to your arma2oa editor 3d.. and place a "HelyHEmpty" near of your vehicle trader .  Copy the code and paste into your trader sqf (where you have the others traders)  this invicible objet( it taked as reference to where spawn the vehicle.

for example:

_vehicle_659 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHEmpty", [1617.7074, 7773.3115, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_659 = _this;
  _this setPos [1617.7074, 7773.3115, 6.1035156e-005];
};

 

Link to comment
Share on other sites

  • 0

another complete example:  i have this lcustom trader "army trafficker" .... he selll and bought  vehiclles,weapons,itemst ..etc

see the sqf... lines in blue to define where vehicles must spawn .

Spoiler

if (isServer) then {


_this = createCenter civilian;
_center_1 = _this;

_group_1 = createGroup _center_1;

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["INS_Lopotev_DZ", [5419.1616, 3811.3203, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setVehicleVarName "trader";
  trader = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
};

_unit_2 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["CDF_Soldier_Medic", [5418.043, 3809.0515, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setDir -54.676876;
  _this setVehicleVarName "sol1";
  sol1 = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
};

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["CDF_WarfareBVehicleServicePoint", [5424.0308, 3813.498, 7.6293945e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 269.42426;
  _this setPos [5424.0308, 3813.498, 7.6293945e-005];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [5407.7061, 3802.4092, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -131.3925;
  _this setPos [5407.7061, 3802.4092, 4.5776367e-005];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [5422.3887, 3790.551, -7.6293945e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 177.68925;
  _this setPos [5422.3887, 3790.551, -7.6293945e-005];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Chair_EP1", [5420.6592, 3811.3865, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -152.36378;
  _this setVehicleVarName "chair";
  chair = _this;
  _this setPos [5420.6592, 3811.3865, -1.5258789e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [5419.1714, 3814.8074, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setPos [5419.1714, 3814.8074, -3.0517578e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHCivil", [5408.5278, 3826.0535, 7.6293945e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setPos [5408.5278, 3826.0535, 7.6293945e-005];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHEmpty", [5408.3813, 3825.3184, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setPos [5408.3813, 3825.3184, 1.5258789e-005];
};

_this = createTrigger ["EmptyDetector", [5415.2104, 3811.2756, -9.1552734e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["CIV", "PRESENT", true];
_this setTriggerStatements ["this", "trader playmove ""ActsPercSnonWnonDnon_tableSupport_TalkA"";", ""];
_trigger_0 = _this;

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Table_EP1", [5418.8921, 3812.2117, -0.06759686], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir -91.545029;
  _this setPos [5418.8921, 3812.2117, -0.06759686];
};

_this = createTrigger ["EmptyDetector", [5418.9258, 3813.843, -3.0517578e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["CIV", "PRESENT", true];
_this setTriggerStatements ["this", "sol1 playmove ""ActsPercMstpSnonWpstDnon_sceneBardakRifle02"";", ""];
_trigger_1 = _this;

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["BAF_Offroad_W", [5420.7915, 3807.813, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir 110.14845;
  _this setVehicleLock "LOCKED";
  _this setPos [5420.7915, 3807.813, -3.0517578e-005];
};

};

 

 

 

Link to comment
Share on other sites

  • 0

Thank you for your reply @juandayz the file above the mission.sqf found in dayz_server\missions\DayZ_Epoch_11.Chernarus?    In the blue lines you added how does the specific trader know that is his spawn point for vehicle's?

 

Thanks for your help

 

After looking though my dayz_server\missions\DayZ_Epoch_11.Chernarus/mission.sqf file I found this.

 

This is the trader (the actual guy) at NWAF

 

//nwaf aircraft
_unit_1355 = objNull;
if (true) then
{
  _this = createAgent ["Worker4", [4984.6436, 9919.415], [], 0, "CAN_COLLIDE"];
  _unit_1355 = _this;
  _this setDir 286;
  _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 is where the item actually spawns in.

 

// nwaf air trader pad


_vehicle_1357 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHCivil", [4942.55, 9909.46], [], 0, "CAN_COLLIDE"];
  _vehicle_1357 = _this;
  _this setPos [4942.55, 9909.46];
  _this setDir 329;
};

What links the two together?  The unit number from the trader is different from the vehicle number of the spawn location, so it must not be linked that way.

Link to comment
Share on other sites

  • 0
1 hour ago, sampson42002 said:

Thank you for your reply @juandayz the file above the mission.sqf found in dayz_server\missions\DayZ_Epoch_11.Chernarus?    In the blue lines you added how does the specific trader know that is his spawn point for vehicle's?

 

Thanks for your help

 

After looking though my dayz_server\missions\DayZ_Epoch_11.Chernarus/mission.sqf file I found this.

 

This is the trader (the actual guy) at NWAF

  Reveal hidden contents

//nwaf aircraft
_unit_1355 = objNull;
if (true) then
{
  _this = createAgent ["Worker4", [4984.6436, 9919.415], [], 0, "CAN_COLLIDE"];
  _unit_1355 = _this;
  _this setDir 286;
  _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 is where the item actually spawns in.

  Reveal hidden contents

// nwaf air trader pad


_vehicle_1357 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHCivil", [4942.55, 9909.46], [], 0, "CAN_COLLIDE"];
  _vehicle_1357 = _this;
  _this setPos [4942.55, 9909.46];
  _this setDir 329;
};

What links the two together?  The unit number from the trader is different from the vehicle number of the spawn location, so it must not be linked that way.

well see...the only way to know is compare the coords with AI traders. ç

You can get de ID trader from your server_traders.sqf or server_traders_cherno_11.sqf (for coins system).

once you have the AI trader ID... open the mission.sqf (dayz_server\missions\DayZ_Epoch_11.Chernarus/)

Find the trader id in this file.. and remember the coords.

Now search all "HelyHEmpty"  and compare the coords with the trader coords.

Link to comment
Share on other sites

  • 0

for my example.... lines in red are the AI trader.... and lines in blue are the spawn location for this trader.

Spoiler

if (isServer) then {


_this = createCenter civilian;
_center_1 = _this;

_group_1 = createGroup _center_1;

_unit_1 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["INS_Lopotev_DZ", [5419.1616, 3811.3203, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _unit_1 = _this;
  _this setVehicleVarName "trader";
  trader = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
};

_unit_2 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["CDF_Soldier_Medic", [5418.043, 3809.0515, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _unit_2 = _this;
  _this setDir -54.676876;
  _this setVehicleVarName "sol1";
  sol1 = _this;
  _this setUnitAbility 0.60000002;
  _this addEventHandler ["handleDamage", {false}];
};

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["CDF_WarfareBVehicleServicePoint", [5424.0308, 3813.498, 7.6293945e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 269.42426;
  _this setPos [5424.0308, 3813.498, 7.6293945e-005];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [5407.7061, 3802.4092, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -131.3925;
  _this setPos [5407.7061, 3802.4092, 4.5776367e-005];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_posed", [5422.3887, 3790.551, -7.6293945e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 177.68925;
  _this setPos [5422.3887, 3790.551, -7.6293945e-005];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Chair_EP1", [5420.6592, 3811.3865, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -152.36378;
  _this setVehicleVarName "chair";
  chair = _this;
  _this setPos [5420.6592, 3811.3865, -1.5258789e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Fire_barrel", [5419.1714, 3814.8074, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setPos [5419.1714, 3814.8074, -3.0517578e-005];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHCivil", [5408.5278, 3826.0535, 7.6293945e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setPos [5408.5278, 3826.0535, 7.6293945e-005];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["HeliHEmpty", [5408.3813, 3825.3184, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setPos [5408.3813, 3825.3184, 1.5258789e-005];
};

_this = createTrigger ["EmptyDetector", [5415.2104, 3811.2756, -9.1552734e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["CIV", "PRESENT", true];
_this setTriggerStatements ["this", "trader playmove ""ActsPercSnonWnonDnon_tableSupport_TalkA"";", ""];
_trigger_0 = _this;

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Table_EP1", [5418.8921, 3812.2117, -0.06759686], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir -91.545029;
  _this setPos [5418.8921, 3812.2117, -0.06759686];
};

_this = createTrigger ["EmptyDetector", [5418.9258, 3813.843, -3.0517578e-005]];
_this setTriggerArea [5, 5, 0, false];
_this setTriggerActivation ["CIV", "PRESENT", true];
_this setTriggerStatements ["this", "sol1 playmove ""ActsPercMstpSnonWpstDnon_sceneBardakRifle02"";", ""];
_trigger_1 = _this;

_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["BAF_Offroad_W", [5420.7915, 3807.813, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir 110.14845;
  _this setVehicleLock "LOCKED";
  _this setPos [5420.7915, 3807.813, -3.0517578e-005];
};

};

 

Link to comment
Share on other sites

  • 0

Ok so here is my trader

 

_unit_1359 = objNull;


if (true) then
{
  _this = createAgent ["Worker1", [1719.3967, 7730.4561, 0.006], [], 0, "CAN_COLLIDE"];
  _unit_1359 = _this;
  _this setDir 207.1917;
  _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;};

 

Then just add this

 

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Heli_H_cross", [1690.0725, 7723.5293, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setPos [1690.0725, 7723.5293, 0];
};

 

Changing the vehicle number to whatever random number that is not being used?

 

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...