Replace tags in attach

This commit is contained in:
Nicolás Badano 2015-01-13 20:07:52 -03:00
parent 46cf9a194a
commit d4bcc413b0

View File

@ -26,30 +26,30 @@ if !((_itemName in items _unit) or (_itemName in magazines _unit)) exitWith {};
// Attach item
switch true do {
case (_itemName == "AGM_IR_Strobe_Item") : {
_attachedItem = "AGM_IR_Strobe_Effect" createVehicle [0,0,0];
case (_itemName == "ACE_IR_Strobe_Item") : {
_attachedItem = "ACE_IR_Strobe_Effect" createVehicle [0,0,0];
_attachedItem attachTo [_unit,[0,-0.11,0.16],"pilot"];//makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
[localize "STR_AGM_Attach_IrStrobe_Attached"] call EFUNC(common,displayTextStructured);
[localize "STR_ACE_Attach_IrStrobe_Attached"] call EFUNC(common,displayTextStructured);
};
case (_itemName == "B_IR_Grenade") : {
_attachedItem = "B_IRStrobe" createVehicle [0,0,0];
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
[localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
[localize "STR_ACE_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
};
case (_itemName == "O_IR_Grenade") : {
_attachedItem = "O_IRStrobe" createVehicle [0,0,0];
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
[localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
[localize "STR_ACE_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
};
case (_itemName == "I_IR_Grenade") : {
_attachedItem = "I_IRStrobe" createVehicle [0,0,0];
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
[localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
[localize "STR_ACE_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
};
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
_attachedItem = _itemName createVehicle [0,0,0];
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
[localize "STR_AGM_Attach_Chemlight_Attached"] call EFUNC(common,displayTextStructured);;
[localize "STR_ACE_Attach_Chemlight_Attached"] call EFUNC(common,displayTextStructured);;
};
default {
if (true) exitWith {};