Jump to content
  • 0

Static weapon disassemble script


ViktorReznov

Question

6 answers to this question

Recommended Posts

  • 0
3 hours ago, ViktorReznov said:

When you look at any static weapon, a scroll wheel option is displayed for Disassemble _this

where is this script located? I haven't been able to track it down. And yes, im looking for exact details on this script, not similar to scripts, Please and thank you!

dont know where becomes..,think you gonna need tag here people who know the deep inside of arma2..   @Richie ebay,vbwallow,salival. I also wanna know about this actions like the one ypur looking for or for example the option get in vehicles.....but ypur script can be recreated by this way:

Spoiler

_IsMountedWeapon = _this select 3;
_pos = getPos _IsMountedWeapon;
_posWGround = [_pos select 0,_pos select 1,0];

player playActionNow "Medic";

_delobj = _IsMountedWeapon;
_objectID = _delobj getVariable["ObjectID","0"];
_objectUID = _delobj getVariable["ObjectUID","0"];
_objectID = _delobj getVariable["ObjectID","0"];
deleteVehicle _delobj;


[_objectID,_objectUID] call server_deleteObj;

deleteVehicle _delobj;


PVDZ_obj_Destroy = [_objectID,_objectUID,_delobj];


publicVariableServer "PVDZ_obj_Destroy";



_holder = createVehicle ['Weaponholder',_posWGround,[],0,'NONE'];
_holder addWeaponCargoGlobal "DZ_LargeGunBag_EP1";
player reveal [_holder];

 

 

Link to comment
Share on other sites

  • 0
5 hours ago, juandayz said:

dont know where becomes..,think you gonna need tag here people who know the deep inside of arma2..   @Richie @ebay @vbawol  @salival. I also wanna know about this actions like the one ypur looking for or for example the option get in vehicles.....but ypur script can be recreated by this way:

  Hide contents


_IsMountedWeapon = _this select 3;
_pos = getPos _IsMountedWeapon;
_posWGround = [_pos select 0,_pos select 1,0];

player playActionNow "Medic";

_delobj = _IsMountedWeapon;
_objectID = _delobj getVariable["ObjectID","0"];
_objectUID = _delobj getVariable["ObjectUID","0"];
_objectID = _delobj getVariable["ObjectID","0"];
deleteVehicle _delobj;


[_objectID,_objectUID] call server_deleteObj;

deleteVehicle _delobj;


PVDZ_obj_Destroy = [_objectID,_objectUID,_delobj];


publicVariableServer "PVDZ_obj_Destroy";



_holder = createVehicle ['Weaponholder',_posWGround,[],0,'NONE'];
_holder addWeaponCargoGlobal "DZ_LargeGunBag_EP1";
player reveal [_holder];

 

 

The thing is, im using the stock arma script to deploy these vehicles but they are not permanent. I have my Scrapper mod to give the required bags to create them, a script to be able to pick up/equip/drop/rotateEquipped bags. now i need to learn where that script comes from to be able to either edit or change the filepath of the exec script to my own. Im betting its going to be something that works off of the config entries since each static weapon has a similar setup to vanilla crafting

Static mg class config

Spoiler

class M2StaticMG_US_EP1 : M2StaticMG_base {
        expansion = 1;
        scope = public;
        side = TWest;
        faction = BIS_US;
        crew = "US_Soldier_EP1";
        typicalCargo[] = {"US_Soldier_EP1"};
        
        class assembleInfo {
            primary = false;
            base = "";
            assembleTo = "";
            dissasembleTo[] = {"M2StaticMG_US_Bag_EP1", "Tripod_Bag"};
            displayName = "";
        };
    };

And its bag

Spoiler

class M2StaticMG_US_Bag_EP1: Weapon_Bag_Base_EP1
    {
        scope = 2;
        displayName = "M2 Machine Gun Bag";
        class assembleInfo: assembleInfo
        {
            displayName = "M2 Machine Gun";
            assembleTo = "M2StaticMG_US_EP1";
        };
    };

hmmmm, what if I made a mission config file, inheriting these original classes, deleting the stuff i dont need and adding other useful stuff, like using the stock system to pickup/drop bags and then being able to call my own assemble/disassemble script? would it work? is it possible?

Link to comment
Share on other sites

  • 0
1 minute ago, salival said:

I don't think you're going to be able to interact with the deployable guns like you think. In my experience they are buggy and probably should be left alone

So far, they are working flawlessly, just need to get them recognized by sched_safetyVehicle and alls been well so far

also why im trying to figure out how the assemble/disassemble script works to overwrite/change it. get it to spawn with a new var that scheduler recognizes as safe(like admin tools spawn) and have them commited to database.

Link to comment
Share on other sites

  • 0

one important note on mounted mgs:

different classnames are available for each gun. meaning: there are several m2's which look the same, but have different classnames.

a difference I noticed is, that some are able to be dissassembled and some not.

I tested different classnames. I wanted my players not to be able to dissassemble the guns per the default arma script, as this always produced 2 backpacks. one large and one small. I instead made a custom script which uses the appropriate backpacks also available which also dont have an option to unpack per default.

in the end, once I figured out all the correct classnames, I made custom scripts for pickung up the mg backpacks and wrote an database compatible script for dissassembling and repacking them.

this is a list of gunbags and their appropriate mounted mg classnames:

	case (_staticweapon iskindof "MK19_TriPod"): 				{_classname = "MK19_TriPod_US_Bag_EP1";};
	case (_staticweapon iskindof "M2StaticMG"): 				{_classname = "M2StaticMG_US_Bag_EP1";};
	case (_staticweapon iskindof "M2HD_mini_TriPod"): 			{_classname = "M2HD_mini_TriPod_US_Bag_EP1";};
	case (_staticweapon iskindof "DSHKM_Ins"): 					{_classname = "DSHKM_TK_GUE_Bag_EP1";};
	case (_staticweapon iskindof "DSHkM_Mini_TriPod"): 			{_classname = "DSHkM_Mini_TriPod_TK_GUE_Bag_EP1";};
	case (_staticweapon iskindof "KORD_high"): 					{_classname = "KORD_high_UN_Bag_EP1";};
	case (_staticweapon iskindof "KORD"): 						{_classname = "KORD_UN_Bag_EP1";};
	case (_staticweapon iskindof "AGS_RU"): 					{_classname = "AGS_UN_Bag_EP1";};

 

Link to comment
Share on other sites

  • 0
1 hour ago, seelenapparat said:

one important note on mounted mgs:

different classnames are available for each gun. meaning: there are several m2's which look the same, but have different classnames.

a difference I noticed is, that some are able to be dissassembled and some not.

I tested different classnames. I wanted my players not to be able to dissassemble the guns per the default arma script, as this always produced 2 backpacks. one large and one small. I instead made a custom script which uses the appropriate backpacks also available which also dont have an option to unpack per default.

in the end, once I figured out all the correct classnames, I made custom scripts for pickung up the mg backpacks and wrote an database compatible script for dissassembling and repacking them.

this is a list of gunbags and their appropriate mounted mg classnames:


	case (_staticweapon iskindof "MK19_TriPod"): 				{_classname = "MK19_TriPod_US_Bag_EP1";};
	case (_staticweapon iskindof "M2StaticMG"): 				{_classname = "M2StaticMG_US_Bag_EP1";};
	case (_staticweapon iskindof "M2HD_mini_TriPod"): 			{_classname = "M2HD_mini_TriPod_US_Bag_EP1";};
	case (_staticweapon iskindof "DSHKM_Ins"): 					{_classname = "DSHKM_TK_GUE_Bag_EP1";};
	case (_staticweapon iskindof "DSHkM_Mini_TriPod"): 			{_classname = "DSHkM_Mini_TriPod_TK_GUE_Bag_EP1";};
	case (_staticweapon iskindof "KORD_high"): 					{_classname = "KORD_high_UN_Bag_EP1";};
	case (_staticweapon iskindof "KORD"): 						{_classname = "KORD_UN_Bag_EP1";};
	case (_staticweapon iskindof "AGS_RU"): 					{_classname = "AGS_UN_Bag_EP1";};

 

huh, i have had some trouble with the produced bag not having a config entry (dshkm ins for instance) and have not yet stopped to sort through each one. ive been using the information located here: https://community.bistudio.com/wiki/ArmA_2_OA:_Backpacks

much appreciated for the info and insight!

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