OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Wolfrug on 11 Nov 2010, 22:30:09

Title: RUG_AssignEQ - Assigning config-based equipment to unit
Post by: Wolfrug on 11 Nov 2010, 22:30:09
Hello all,

This is an extremely simple script that I, nonetheless, thought the general public might have some use for. What it does is simply replace the weapons and equipment of a unit with that of another (default, config-based) unit's. So for instance if you want your CDF Militiaman to instead be sporting a full machinegunner's default gear, you could simply use this script instead of making a custom re-gearing script for each possible combination.

Use:

[unitName, "unit_class"] execvm "RUG_AssignEQ.sqf";

Unit classes can be found here: CfgVehicles (http://www.ofpec.com/COMREF/index.php?action=read&id=209#Man).

As mentioned, a very simple script, but perhaps useful for some of you :) Attached below both script in itself (with comments) and a "demo mission".

NB: This script obviously cannot turn a militia soldier into a medic or engineer or change anything in their configs - it just replaces equipment.

Enjoy!

Wolfrug out.

 
Title: Re: RUG_AssignEQ - Assigning config-based equipment to unit
Post by: kju on 12 Nov 2010, 09:45:26
nice idea. good job  :good:
Title: Re: RUG_AssignEQ - Assigning config-based equipment to unit
Post by: Wolfrug on 12 Nov 2010, 16:36:28
Thanks :)

Feel free to upload this one to the ED if you want, as far as I can tell it should work with no problem.  :cool2: Oh, and it should work for ArmA as well, if you remove the removeallItems command!

Wolfrug out.