Jump to content
Sign in to follow this  
GeneralCarver

GeneralCarver Vehicle Ammo Crate Script

Recommended Posts

GeneralCarver Vehicle Ammo Crate

Description:

This script gives the driver of a vehicle the ability to drop an ammo crate behind the vehicle. The ammo crate is not connected to or stored in the vehicle, it is simply moved between its storage marker and the deployment position behind the vehicle. Vehicles must be within 20m to "load" the crate.

Compatibility: ArmA 2: OA.

Features:

  • Deploy/load ammo crate for a vehicle via your action menu.
  • Vehicle respawn not supported.
  • Multiplayer Compatible
  • intended for ground vehicles only.

Demo Video:

Installation:

  1. Copy over the scripts directory to your mission's directory.
  2. copy over the init.sqf contents to your mission's init.sqf.
    • description of init scripting...
    • gc_veh_ammo_crate_vehicle_array - Array of vehicles in game which script supports.
    • gc_veh_ammo_crate_ammo_crate_array - array of ammo crates for vehicles
    • gc_veh_ammo_crate_storage_marker_array - array of storage markers for each crate. In string format. Example: ["MARKERNAME", "MARKERNAME"...]
    • gc_veh_ammo_crate_y_offset_value - distance behind the vehicle ammo crate needs to clear the vehicle when deployed. Will always be a negative value. Experiment to set for each class of vehicle your using.
    • Note: The association of marker, ammo crate and vehicle is dependent on their order in the array, be sure their order in each array matches.

[*]Merge the contents of the template mission with yours in the editor. This script DOES require the functions module to be in your mission (included in the sample mission)

[*]Ensure you do not have multiple function modules in your mission. You only need one.

[*]In the Mission Editor change the vehicle in the editor to the type of vehicle you need in your mission.

[*]In the mission editor name the ammo crate and storage marker with a name which will show you the vehicle, ammo crate, and storage marker are all associated.

[*]In the Mission Editor move the ammo crate DIRECTLY over top of the storage marker and then move the two off away from the mission area. These must be hidden from players.

[*]Back in the mission init.sqf put the names of the vehicle, marker and ammo crate in the appropriate array. Their order in each array must match (reference the array descriptions above)

[*]Repeat steps as necessary to add more vehicles supported by the script.

JIP Compatibility Warning:

If you script in the init of the ammo box under its properties, this scripting will execute every time a client connects to the server if your mission has join in progress. So, if you had a script which added 5 magazines to the crate, every time someone joined in progress the script would execute and add 5 more magazines. Although this is not terrible, be aware as it may have unintended consequences on your mission. Especially avoid clearing the cargo of the crate. This will remove all inventory if someone joins in progress which means if players have placed gear in the crate, it will be deleted.

Use:

100% Open Source. Use and modify as needed.

Download Link:

http://www.4shared.com/file/MgQtPb9t/gc_veh_ammo_crate.html

(always use this link for most up to date version)

-note: at this time i do not give my approval for ArmAholic to host this script. Armaholic admins can PM me.

Share this post


Link to post
Share on other sites

Hi General...

when we finish the coop safari ? :)

this script is what I'm looking for my warfare tournament edition because I want remove the equipment buy option inside city camp.

Is possible to have more ammo box on the field ?

Is possible to customize ammo box ?

Is possible to have different box for different Side ?

I will write you a pm soon

I need help with my mission to use it next year in upcoming warfare tournament

... as promised I will send you a bottle of good italian wine :)

Share this post


Link to post
Share on other sites

Thanks for sharing this GC.

To alleviate the JIP issues, would adding this line near the start of the script(s) create problems, do you think:

if (! isServer) exitwith {}; 

I haven't looked at the scripts in detail, but I don't see why it wouldn't work. It'd be nice to avoid those JIP issues. And be able to use this nicely made script on larger missions (where JIP is a possibility).

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  

×