Jump to content
  • 0

Adding an Ammo cache @ Custom Location on restart


Link

Question

So I have some custom locations installed on my server and I would like to spawn in a big weapon cache with predefined loot after every restart at a custom coordinate location. What's the best way to do this? I have WAI/EMS AI systems installed and I was wondering if I could somehow utilize them to do the job. Any ideas?

 

Thanks.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Well this is easy as WAI has something built into it for this.

 

@DayZ_Epoch_Server\addons\dayz_server\WAI\missions\StaticAmmoBoxes.sqf
 

/* Add ammmo boxes to static locations on map and fills it with loot from missionCfg.sqf

creates a ammo box at [0,0,0] then fills it

_box = createVehicle ["BAF_VehicleBox",[0,0,0], [], 0, "CAN_COLLIDE"];
[_box] call spawn_ammo_box;

creates a 2nd ammo box at [1,1,1] then fills it

_box2 = createVehicle ["BAF_VehicleBox",[1,1,1], [], 0, "CAN_COLLIDE"];
[_box2] call spawn_ammo_box;

add custom ammo boxes below this line
*/

If you want random location just use this "call BIS_fnc_selectRandom"

Link to comment
Share on other sites

  • 0

Do you want the crate to be static loot or dynamic like in EMS? Also do you want the crate to always be in the same position or random at restart?

 

Static and in the same position on restart

 

Well this is easy as WAI has something built into it for this.

 

@DayZ_Epoch_Server\addons\dayz_server\WAI\missions\StaticAmmoBoxes.sqf

 

/* Add ammmo boxes to static locations on map and fills it with loot from missionCfg.sqf

creates a ammo box at [0,0,0] then fills it

_box = createVehicle ["BAF_VehicleBox",[0,0,0], [], 0, "CAN_COLLIDE"];
[_box] call spawn_ammo_box;

creates a 2nd ammo box at [1,1,1] then fills it

_box2 = createVehicle ["BAF_VehicleBox",[1,1,1], [], 0, "CAN_COLLIDE"];
[_box2] call spawn_ammo_box;

add custom ammo boxes below this line
*/

If you want random location just use this "call BIS_fnc_selectRandom"

 

Okay so I can use this to spawn in an object at a select coordinate location. How could I spawn one of these in?

 

UniversalCrateFillerSmall.jpg

 

and if I want to customly specify the static loot that respawns every server restart, do I just do this inside of the missionCfg somewhere?

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