Jump to content

denial

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Posts posted by denial


  1. Easiest way to do this is to set the intial spawn kit and then a function to execute a script to reassign the items on repsawn.

    In your unit's init field (I'm doing it per player, but you can do it as a group as well to save time):

    Thank u so much! this work perfectly.

    i tryied to use only the eventhandler by recall my previous sqf but didnt work, now i need only to create a single gear sqf for each unit, player. the only problem is the Carrier Lite, i cant remove it.

    id = ["rifleman2", this] call compile preprocessFileLineNumbers "gear.sqf"; this addEventHandler ["Respawn","_this execvm 'gear.sqf'"];

    gear.sqf

    private ["_type", "_unit"];
    
    _type = _this select 0;
    _unit = _this select 1;
    
    removeallweapons _unit;
    removeAllAssignedItems _unit;
    removebackpack _unit;
    removeVest _unit;
    removeUniform _unit;
    removeHeadGear _unit;
    _unit addWeapon "ItemMap";
    _unit addWeapon "ItemCompass";
    _unit addItem "NVGoggles";
    
    
    switch (_type) do
    {	
    case "rifleman":
    {
    _unit addUniform "U_C_Commoner1_1";
    _unit addHeadgear "H_Cap_red";
    };	
    
    case "rifleman2":
    {
    _unit addUniform "U_C_Commoner1_1";
    _unit addHeadgear "H_Cap_blu";
    };	
    
    case "rifleman3":
    {
    _unit addUniform "U_C_Commoner1_1";
    _unit addHeadgear "H_Cap_brn_SERO";
    };	
    case "rifleman4":
    {
    _unit addUniform "U_C_Commoner1_1";
    _unit addHeadgear "H_MilCap_ocamo";
    };
    case "pellegrino":
    {
    _unit addUniform "U_C_Poloshirt_tricolour";
    _unit addHeadgear "H_Cap_red";
    };	
    
    case "pellegrino2":
    {
    _unit addUniform "U_C_Poloshirt_tricolour";
    _unit addHeadgear "H_Cap_blu";
    };	
    
    case "pellegrino3":
    {
    _unit addUniform "U_C_Poloshirt_tricolour";
    _unit addHeadgear "H_Cap_brn_SERO";
    };	
    
    case "pellegrino4":
    {
    _unit addUniform "U_C_Poloshirt_tricolour";
    _unit addHeadgear "H_MilCap_ocamo";
    };
    case "pupino":
    {
    _unit addUniform "U_C_Poloshirt_burgundy";
    _unit addHeadgear "H_Cap_red";
    };	
    
    case "pupino2":
    {
    _unit addUniform "U_C_Poloshirt_burgundy";
    _unit addHeadgear "H_Cap_blu";
    };	
    
    case "pupino3":
    {
    _unit addUniform "U_C_Poloshirt_burgundy";
    _unit addHeadgear "H_Cap_brn_SERO";
    };	
    
    case "pupino4":
    {
    _unit addUniform "U_C_Poloshirt_burgundy";
    _unit addHeadgear "H_MilCap_ocamo";
    };	
    };


  2. Hi all,

    i'm at my first mission editing, copy and paste based scripting :)

    i have set up a simple respawn script with description.ext

    and a custom civilian loadout with no weapon, based on a sqf file

    i need to reload the basic custom loadout at respawn for each faction (blufor, opfor and civilian)

    i found some scripts that's looks like but i can't make this working.

    http://www.ofpec.com/forum/index.php?topic=34253.0

    http://forums.bistudio.com/showthread.php?101419-Save-loadout-script

    any other solution or simple solution with the new arma3 scripting?

    thanks in advance and sorry for bad grammar :)

×