Jump to content
  • 0

Spawn a non persistent vehicle on same place


flow0815

Question

Hey togehter,

 

we have custom military area at the airfield and is just wanted to know if anybody could say how to spawn a custome vehicle in a defined place there.

The vehicle should not be permanent (shold not be the same vehicle after restart, if they can sell it it is okay). After the restart the vehicle should be on the same place again.

So there is always this vehicle setup fresh on restart and the "old" one deleted. I hope you understand what i mean.

 

Gues this should not be to difficult but no idea to get it on. Maybe like a object in arma which i would place in altis.h mapfile?

 

Thanks

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Not sure if this what you are looking for.. Go to a3_epoch_server_settings\configs\maps and open altis.h

 

At the bottom there is a "preferred locations for vehicles" list where you can add coords there. I have personally not tried this so I cant say for sure but it seems correct. Not sure about removing persistence..

Link to comment
Share on other sites

  • 0

Hey togehter,

 

we have custom military area at the airfield and is just wanted to know if anybody could say how to spawn a custome vehicle in a defined place there.

The vehicle should not be permanent (shold not be the same vehicle after restart, if they can sell it it is okay). After the restart the vehicle should be on the same place again.

So there is always this vehicle setup fresh on restart and the "old" one deleted. I hope you understand what i mean.

 

Gues this should not be to difficult but no idea to get it on. Maybe like a object in arma which i would place in altis.h mapfile?

 

Thanks

 

I run it serverside.

example

 

custom_vehicles.sqf

 

private ["_objs"];
_objs = [
	["B_Heli_Light_01_EPOCH",[14273.4, 13115.4, 8.59157],353,[[0,1,0],[0,0,1]],false],       
	["O_MRAP_02_hmg_F",[14242.4,13070.2,0.874009],175,[[0,1,0],[0,0,1]],false],             
	["O_MRAP_02_hmg_F",[14249.4,13070.8,0.874009],175,[[0,1,0],[0,0,1]],false],             
	["I_MRAP_03_hmg_F",[14256.3,13071.4,0.817941],175,[[0,1,0],[0,0,1]],false],             
	["O_MRAP_02_F",[14263.3,13072,0.458458],175,[[0,1,0],[0,0,1]],false],                  
	["B_MRAP_01_hmg_F",[14270.3,13072.6,0.345611],175,[[0,1,0],[0,0,1]],false],             
	["I_Heli_Transport_02_EPOCH",[14250.9, 13044.2, 0.41],355,[[0,1,0],[0,0,1]],false],    
	["Cha_BTR60_TK",[14277.2,13073.2,0.495796],175,[[0,1,0],[0,0,1]],false],                	
	["I_MRAP_03_hmg_F",[11560.6, 11945.5, 0.1351],121,[[0,1,0],[0,0,1]],false],             
	["I_Heli_Transport_02_EPOCH",[11713.8, 11861.6, 2.6],218,[[0,1,0],[0,0,1]],false],       
	["I_MRAP_03_hmg_F",[12430.7, 15215.2, 0.3],90,[[0,1,0],[0,0,1]],false]                 
		
];

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
    _obj setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _obj setVariable["LAST_CHECK",1000000000000];
    _obj call EPOCH_server_setVToken;     
    addToRemainsCollector[_obj];	
    clearWeaponCargoGlobal    _obj;
    clearMagazineCargoGlobal  _obj;
    clearBackpackCargoGlobal  _obj;
    clearItemCargoGlobal       _obj;		
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
    _obj setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _obj setVariable["LAST_CHECK",1000000000000];
    _obj call EPOCH_server_setVToken;     
    addToRemainsCollector[_obj];	
    clearWeaponCargoGlobal    _obj;
    clearMagazineCargoGlobal  _obj;
    clearBackpackCargoGlobal  _obj;
    clearItemCargoGlobal       _obj;			
	};
} foreach _objs;

 

Vehicles respawn to same place after restart.

Link to comment
Share on other sites

  • 0

Not sure if this what you are looking for.. Go to a3_epoch_server_settings\configs\maps and open altis.h

 

At the bottom there is a "preferred locations for vehicles" list where you can add coords there. I have personally not tried this so I cant say for sure but it seems correct. Not sure about removing persistence..

 

thats for when you buy them, it is irrelevant for what he wants to do.

 

Hey togehter,

 

we have custom military area at the airfield and is just wanted to know if anybody could say how to spawn a custome vehicle in a defined place there.

The vehicle should not be permanent (shold not be the same vehicle after restart, if they can sell it it is okay). After the restart the vehicle should be on the same place again.

So there is always this vehicle setup fresh on restart and the "old" one deleted. I hope you understand what i mean.

 

Gues this should not be to difficult but no idea to get it on. Maybe like a object in arma which i would place in altis.h mapfile?

 

Thanks

 

find the locations you want them to spawn, then make a small script to spawn in the vehicles each restart.

 

you can easily make something that would spawn random vehicles in predefined positions.

Link to comment
Share on other sites

  • 0

I run it serverside.

example

 

custom_vehicles.sqf

 

private ["_objs"];
_objs = [
	["B_Heli_Light_01_EPOCH",[14273.4, 13115.4, 8.59157],353,[[0,1,0],[0,0,1]],false],       
	["O_MRAP_02_hmg_F",[14242.4,13070.2,0.874009],175,[[0,1,0],[0,0,1]],false],             
	["O_MRAP_02_hmg_F",[14249.4,13070.8,0.874009],175,[[0,1,0],[0,0,1]],false],             
	["I_MRAP_03_hmg_F",[14256.3,13071.4,0.817941],175,[[0,1,0],[0,0,1]],false],             
	["O_MRAP_02_F",[14263.3,13072,0.458458],175,[[0,1,0],[0,0,1]],false],                  
	["B_MRAP_01_hmg_F",[14270.3,13072.6,0.345611],175,[[0,1,0],[0,0,1]],false],             
	["I_Heli_Transport_02_EPOCH",[14250.9, 13044.2, 0.41],355,[[0,1,0],[0,0,1]],false],    
	["Cha_BTR60_TK",[14277.2,13073.2,0.495796],175,[[0,1,0],[0,0,1]],false],                	
	["I_MRAP_03_hmg_F",[11560.6, 11945.5, 0.1351],121,[[0,1,0],[0,0,1]],false],             
	["I_Heli_Transport_02_EPOCH",[11713.8, 11861.6, 2.6],218,[[0,1,0],[0,0,1]],false],       
	["I_MRAP_03_hmg_F",[12430.7, 15215.2, 0.3],90,[[0,1,0],[0,0,1]],false]                 
		
];

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
    _obj setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _obj setVariable["LAST_CHECK",1000000000000];
    _obj call EPOCH_server_setVToken;     
    addToRemainsCollector[_obj];	
    clearWeaponCargoGlobal    _obj;
    clearMagazineCargoGlobal  _obj;
    clearBackpackCargoGlobal  _obj;
    clearItemCargoGlobal       _obj;		
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
    _obj setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _obj setVariable["LAST_CHECK",1000000000000];
    _obj call EPOCH_server_setVToken;     
    addToRemainsCollector[_obj];	
    clearWeaponCargoGlobal    _obj;
    clearMagazineCargoGlobal  _obj;
    clearBackpackCargoGlobal  _obj;
    clearItemCargoGlobal       _obj;			
	};
} foreach _objs;

 

Vehicles respawn to same place after restart.

 

Do the vehicle stay after resatart or just spawned new? they are not saved to hive i guess? This was the solution i was thinking about. You could use that with macas custom pbo for example

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