Jump to content
Lala14

[Release]Some Scripts(MineDetector w/ sound)(Vanilla to xMed1 Converter) & moar

Recommended Posts

Hi

I am very new to scripting and I have been trying to get the Crater Cleaner & Destroyed Vehicle Remover to work

I have added the line null = [] execVM "cratercleaner.sqf"; to the vehicle init and I think I am right by putting the cratercleaner.sqf file in the mission folder and set the CCAbleToRepair to =1. I am not sure of any other settings after that so I have not changed them.

When I start the game, I briefly see the notice Crater Cleaner Initiated (or something like that) on the screen for a couple of seconds.

After that, nothing happens when I drive up to a damaged vehicle or a bomb crater.

Any help to point me in the right direction would be much appreciated.

Thanks

Dave

That's not how it was intended to work, in your mission the line of code should be placed in the init.sqf and then the action is designed to only come up with the crv-6e bobcat.

Share this post


Link to post
Share on other sites

hi lala!

 

ied script works if the "EOD" is inside a vehicle?

Share this post


Link to post
Share on other sites

hi lala!

 

ied script works if the "EOD" is inside a vehicle?

I think it should. I might be wrong.

Share this post


Link to post
Share on other sites

I think it should. I might be wrong.

Hi thanks for answering.

I tested today and does not work in vehicles. It would be interesting, as a suggestion, operating with vehicles as well.

For now, personally, I'll use it for recognition on foot.

great work and thanks for sharing.

Share this post


Link to post
Share on other sites

Hey thanks for making this very cool bit of kit. Got an error with it, it does not effect the script working but I'd just like to have it cleaned up without errors popping up. (not touched / edited it so unsure whats up)

 

N3Yxkza.jpg

 

Thanks

Share this post


Link to post
Share on other sites

Hey thanks for making this very cool bit of kit. Got an error with it, it does not effect the script working but I'd just like to have it cleaned up without errors popping up. (not touched / edited it so unsure whats up)

 

N3Yxkza.jpg

 

Thanks

I'm pretty sure that whole line inst needed anyway. I was initially going to add in a custom sound with the script to add a better effect, however, I never ended up finding a good custom sound and instead used one from in game. I'll get onto it though.

Share this post


Link to post
Share on other sites

I'm pretty sure that whole line inst needed anyway. I was initially going to add in a custom sound with the script to add a better effect, however, I never ended up finding a good custom sound and instead used one from in game. I'll get onto it though.

 

Thanks I was thinking about getting rid however in a turn of events now when I pull out the minedetector the error vanished, so I guess we're all good :D

Share this post


Link to post
Share on other sites

I've been playing around with the auxillery sling loading but there is one breaking bug though.  I don't know exactly why it happens, but for example I have an humvee hmg sitting on the terrain slightly tilted because of elevation.  When I slingload it with a ghosthawk it seems not all ropes are getting attached to the humvee.  When I start lifting it then and fly a few meters forward, I just lose my cargo.  When I try it on flat terrain I can lift the humvee just fine.  It's a real annoying bug and hard to track down why it happens.

Share this post


Link to post
Share on other sites

I've been playing around with the auxillery sling loading but there is one breaking bug though.  I don't know exactly why it happens, but for example I have an humvee hmg sitting on the terrain slightly tilted because of elevation.  When I slingload it with a ghosthawk it seems not all ropes are getting attached to the humvee.  When I start lifting it then and fly a few meters forward, I just lose my cargo.  When I try it on flat terrain I can lift the humvee just fine.  It's a real annoying bug and hard to track down why it happens.

try this and report back

Share this post


Link to post
Share on other sites

Well I see four ropes attaching now, but the ghosthawk can't lift the vehicle, I'm trying to locate the problem it must have something to do wtih setMass being set incorrectly

Share this post


Link to post
Share on other sites

Well I see four ropes attaching now, but the ghosthawk can't lift the vehicle, I'm trying to locate the problem it must have something to do wtih setMass being set incorrectly

Alright, I'll get onto it asap.

Share this post


Link to post
Share on other sites

probably unrelated but I found this structure in the DoAttaching function

    if ((AuxSling_Weight == 0) && (AuxSling_EveryVehicles == 1)) exitWith { [_unit,_obj,_ropecount] spawn AuxSling_fnc_TheAttaching; };
	if (AuxSling_Weight == 0) exitWith { [_unit,_obj,_ropecount] spawn AuxSling_fnc_TheAttaching; };
	if (_list isEqualTo "AuxSling_heavy_config") then {
		[_unit,_obj,_ropecount] spawn AuxSling_fnc_TheAttaching;
	};
	if (_list isEqualTo "AuxSling_medium_config") then {
		[_unit,_obj,_ropecount] spawn AuxSling_fnc_TheAttaching;
	};
	if (_list isEqualTo "AuxSling_light_config") then {
		[_unit,_obj,_ropecount] spawn AuxSling_fnc_TheAttaching;
	};

in all cases the same action is being executed, I believe this entire structure is unneeded and you can just exit the function with

[_unit,_obj,_ropecount] spawn AuxSling_fnc_TheAttaching;

Share this post


Link to post
Share on other sites

Well I found the bug, It's setMass as expected.  It has to be ran on all machines/server to make it work correctly

	_obj setVariable ["AuxSling_Original_Weight", getMass _obj, true];
	if ((getMass _obj) > (_vehweight*0.8)) then {
		[_obj, (_vehweight*0.8)] remoteExec ["setMass", 0, false];
	};

and

	if ((_obj getVariable ["AuxSling_Original_Weight",0]) != getMass _obj) then {
		[_obj, (_obj getVariable ["AuxSling_Original_Weight",0])] remoteExec ["setMass", 0, false];
		_obj setVariable ["AuxSling_Original_Weight",nil,true];
	};

Fixed it, also I moved the setting of the mass all the way on top before the ropes get attached.  Seems to make more sense to me

Share this post


Link to post
Share on other sites

Lala14  question  about the Crater Cleaner & Destroyed Vehicle Remover.   Did you every get the script to fix a completely destroyed vehicles. I can only repair damaged once. I also can't remover destroyed vehicles from the mission. I looked in the setting but I don't see what I need to change to remove  destroyed vehicles the craters get removed from the mission but not the vehicles. Any help on this would be great. PS I really like the functions this should have been in the vanilla base game for sure. If you are still working on this or making updates a nice function to add to the bobcat would be the ability to place some fortifications during the mission from the bobcat.  Thanks for the script Avibird  

Share this post


Link to post
Share on other sites

that should already be there .... about adding fortifications, i might do that later.

Share this post


Link to post
Share on other sites

Hey  lala14  I did not change any of the default settings. I can repair damaged vehicles but not restore fully blown up vehicles. I also can't delete or remove destroyed vehicles. When I repair the damaged vehicles I pulled the Bobcat next to it then hop into the damaged vehicle and it repair automatically I don't have to select anything. When I pull the Bobcat up to a completely destroyed vehicle no options appear to delete the vehicle or repair it. What am I missing what do you think I'm doing wrong. Avibird.

Share this post


Link to post
Share on other sites

Thank you I will check it out sir. Maybe I missed something up when looking around the script it would not be the first time lol. Avibird

Share this post


Link to post
Share on other sites

The issue was I put the  null = [] execVM "cratercleaner.sqf";  in my mission init.sqf  somewhere in the middle. I have a good bit of code in the my mission init.sqf  this is a mid to large size mission.

 

When I put the your code at the top of my init.sqf  it works fine when it was in the middle the script did not show the red fix text in my command menu. I have no clue why but it works now thank you.

Share this post


Link to post
Share on other sites

there may have been a while loop somewhere before it that hadn't finished so that's why the code never got executed.

Share this post


Link to post
Share on other sites

It did execute but only partly.  I  could  repair damaged vehicles and restore fully blown up vehicles but no option to remove vehicles from the map Anyway it works now thank you for the assist avibird.

Share this post


Link to post
Share on other sites

What color is the the option to remove the vehicle from the map. Is the option only for completely destroyed vehicles or damaged vehicles. Tested late last night I didn't really notice the option to remove the vehicles only fit? 

Share this post


Link to post
Share on other sites

Still can't get the remove vehicle option to show up even in your demo only the fix option shows up.

 

If you are still working on this script some really cool function to add would be.

 

1. The ability to put down defensive fortifications.

2. The ability to tow damaged or destroyed vehicles.

3. The ability to put out fires. I was attempting to restore they totally destroyed vehicle that was still on fire and when I did it blew the vehicle up and my vehicle up (: 

4. The ability to turn off The completely destroyed vehicle function in the field. So you would need to tow the rack back to a base repair station like we had in domination from Arma2.

 

Thanks for the script like I said these functions should have been included in the vanilla game (: 

 

 

Share this post


Link to post
Share on other sites
3 hours ago, Mr. Birdman said:

Still can't get the remove vehicle option to show up even in your demo only the fix option shows up.

 

If you are still working on this script some really cool function to add would be.

 

1. The ability to put down defensive fortifications.

2. The ability to tow damaged or destroyed vehicles.

3. The ability to put out fires. I was attempting to restore they totally destroyed vehicle that was still on fire and when I did it blew the vehicle up and my vehicle up (: 

4. The ability to turn off The completely destroyed vehicle function in the field. So you would need to tow the rack back to a base repair station like we had in domination from Arma2.

 

Thanks for the script like I said these functions should have been included in the vanilla game (: 

 

 

Oh I thought you wanted to repair the vehicle the whole time.

1. I'll probably not make this as I really just don't feel like it as I'm working on the USAF mod. (You could also just use zeus)

2. There is a mod available that already does this. (I believe there is also a script as well) (check advanced towing mod)

3. I might put this in. (I dont think you can remove the fire in arma 3, unlike arma 2)

4. It is available in the script as CCAbleToRepair just set it to 0.

Share this post


Link to post
Share on other sites

hey Lala14  thanks for getting back to me on this. Let me clarify a few things (:

 

I did not realize that the Remove Destroyed vehicle  and the Fix the Destroyed vehicle  functions/AddActions could not be functional at the same time. The mission designer would need to pick one or the other AddAction for the mission.

could both AddActions be added at the same time ? I think it should be a simple code adjustment.

 

The other main issue I was running into with your script is that the script in not compatible while using the team switch function.  If I start a mission using unit A I see the addaction I picked (Remove Destroyed vehicle or Fix the Destroyed vehicle) but if that unit dies or go unconscious and I switch to a new unit B the addaction is gone however any playable unit that you team switch into can still use the repair damaged function when you bring the bobcat to the damaged vehicles.  So I know the script works for the most part while using the team switch function (:

 

I was attempting to add this bit of code to your script foreach (playableUnits + switchableUnits);  to make the addactions show for all units playable.  Any feed back would be great.  PS the same issues with team switch using your minedetector script.    

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

×