Jump to content

[Release] Enhanced Vehicle Deployment (with right click option)


Recommended Posts

  On 6/21/2014 at 2:44 PM, Brockie said:

This is different then the problem you said before.  You said before that the problem was people could pack vehicle from anywhere that the option would not go away.  That would typically be an issue with fn_selfActions.

 

As a reference here is what my fn_selfActions looks like.  Obviously I have renamed things a bit to fit my desire but it works like a charm. 

 

  Reveal hidden contents

//Pack Vehicles

if (_typeOfCursorTarget in StaticVehicleArray and _hasToolbox and !(locked _cursorTarget) and (damage _cursorTarget < 1)) then {

if (s_player_packvehicle < 0) then {

s_player_packvehicle = player addAction ["Pack Vehicle", "Scripts\static_pack.sqf",_cursorTarget, 0, false, true, "",""];

};

} else {

player removeAction s_player_packvehicle;

s_player_packvehicle = -1;

};

// All Traders

 

But you said now the problem is the vehicle doesn't disapear, no refund, and don't get an option to pack, then there's something wrong with your script.  I'm going to guess in the common file?

 

Apologies for the misunderstanding in how I worded it. Yes, people were able to pack vehicles from any distance as long as they walk up to the vehicle and scroll on it to get the 'pack vehicle' option. So, I edited the script to check to see if the vehicle is within 5m of the player before packing (see reply #73 for edited code). However, once I made that change, I started encountering a different problem: you would get the option to pack vehicle --> choose to pack vehicle --> player would go through the animation --> vehicle would not delete --> parts would not get refunded --> no longer have the option to pack vehicle if you scroll wheel on the vehicle again.

 

So, on my production server players are still able to pack vehicles from a long distance. On my test server, my changes aren't deleting the vehicle or refunding parts.

 

Sorry about the confusion.

 

EDIT: Do you think I should remove the check for the vehicle within 5m from EVD_Pack.sqf and move it into the fn_selfActions.sqf script? Maybe something like:

  Reveal hidden contents

I will test this and see. I am still very new to Arma scripting (and coding in general as I only took 1 semester of C++ coding in high school, which was a decade ago), so I apologize for the trouble but I greatly appreciate your input and help. I understand coding logic and syntax in general, so I'm not flying completely blind when it comes to coding, but I am still very new at this.

 

EDIT 2: Issue resolve via PM from @Hardened.

  Quote

 

 

If the problem of people packing vehicles from anywhere persists...

This is the part that removes the option to pack vehicle: IE. If your cursor is not on the target anymore.

player removeAction s_player_packvehicle;

s_player_packvehicle = -1;

Try adding it after this block of code:

player removeAction s_player_fillfuel;

s_player_fillfuel = -1;

player removeAction s_player_studybody;

s_player_studybody = -1;

(near the bottom of fn_selfActions)

 

This fix did indeed work. MUCH easier. Thank you!

Link to comment
Share on other sites

  On 6/21/2014 at 3:05 PM, Enzyme said:

Apologies for the misunderstanding in how I worded it. Yes, people were able to pack vehicles from any distance as long as they walk up to the vehicle and scroll on it to get the 'pack vehicle' option. So, I edited the script to check to see if the vehicle is within 5m of the player before packing (see reply #73 for edited code). However, once I made that change, I started encountering a different problem: you would get the option to pack vehicle --> choose to pack vehicle --> player would go through the animation --> vehicle would not delete --> parts would not get refunded --> no longer have the option to pack vehicle if you scroll wheel on the vehicle again.

 

So, on my production server players are still able to pack vehicles from a long distance. On my test server, my changes aren't deleting the vehicle or refunding parts.

 

Sorry about the confusion.

 

EDIT: Do you think I should remove the check for the vehicle within 5m from EVD_Pack.sqf and move it into the fn_selfActions.sqf script? Maybe something like:

  Reveal hidden contents

I will test this and see. I am still very new to Arma scripting (and coding in general as I only took 1 semester of C++ coding in high school, which was a decade ago), so I apologize for the trouble but I greatly appreciate your input and help. I understand coding logic and syntax in general, so I'm not flying completely blind when it comes to coding, but I am still very new at this.

 

EDIT 2: Issue resolve via PM from @Hardened.

 

This fix did indeed work. MUCH easier. Thank you!

 

No problemo.

 

Here's a video of what I did with this amazing script to deploy mounted weapons: http://youtu.be/oASs2_RUX88

Link to comment
Share on other sites

  On 6/21/2014 at 11:47 PM, Brockie said:

No problemo.

 

Here's a video of what I did with this amazing script to deploy mounted weapons: http://youtu.be/oASs2_RUX88

 

Great work! Would you mind sharing?  B) Would be nice to do something similar with a few tweaks to fit it to my server's style of play.

Link to comment
Share on other sites

  • 2 weeks later...

I think we are having the same problem since the 332 update from Infistar.

The line below appears in the publicvariable.log, (restriction #11 I think),

"04.07.2014 02:59:41: PlayerName (IP) UID - #11 "PVAHR_0_hharrcqnfwtb" =

["PlayerName","ID",

[73,110,118,97,108,105,100,32,73,68,58,32,79,108,100,95,98,105,107,101,95,84,75,95,73,78,83,95,69,80,49,32,64,49,57,49,49

,52,56],[66,65,78,78,69,68]]"

I have tried the above fix (_VTC =  true;) and a few tweaks to BE publicvariable.txt but nothing seems to solve this yet.

Battleye is not my first language so I know little of it. Still fiddling while server burns.

Link to comment
Share on other sites

replaced my old deploy script with this one today

is this set default to not check for required parts to build ??

I can build as many muzzie, motorcycles and bikes as I want without any parts..

I have read other posts with this same issue but I cannot find the solution..

anyone have the updated version of this that uses the required parts  ??? please share maybe again.

Link to comment
Share on other sites

OK so attachments on the forum do not allow me to add .rar files - why??

 

Secondly please see link for files (Modded with all the "fixes" included in this thread): https://www.dropbox.com/s/tev2vuowlu3dik9/EVD.rar

 

Hope it helps :)

 

Pry

 

Edit: The above linked file will remove the toolbox upon deploying the bike / other items. If you don't want this then change EVD_deploy to the following:

 

  Reveal hidden contents

 

Sorry about that.

 

Pry

Edited by PryMary
Link to comment
Share on other sites

  • 2 weeks later...

The bike despawns after about 30 seconds on my server, also the option to repack does not appear

Can anyone help me to fix this ?

 

Epoch 1.0.5.1

Beta:112555

 

My fn_selfactions.sqf

//Pack Vehicles
	if (_typeOfCursorTarget in EVDVehicleArray and !(locked _cursorTarget) and (damage _cursorTarget < 1)) then {
		if (s_player_packvehicle < 0) then {
			s_player_packvehicle = player addAction ["<t color=""#008aff"">Pack Vehicle</t>", "Scripts\EVD\EVD_pack.sqf",_cursorTarget, 0, false, true, "",""];
		};
	} else {
		player removeAction s_player_packvehicle;
		s_player_packvehicle = -1;
	};

Thanks :)

Link to comment
Share on other sites

Yep, I've got exactly the same problems KrisiS, even bought bikes and mozzies of the same type will teleport back to where they were last used on restart. Going to have to pull this mod and use another toolbox bike script for now, which is a pity because this one looks really good.

Link to comment
Share on other sites

Im trying to install this on my server.  I have redone each step about four times now.... everytime I load my server it crashes and says

 

"include file vilayercodecustom\mission\epoch.chernrus\custom\extra_rc.hpp"

 

im certain that im placing this file in the proper location as it is in this exact location..

 

 

any help?

Link to comment
Share on other sites

I have been using this script and it worked fine UNTIL 1.0.5.1 125548

When someone gets on any of the three items, after about 14 seconds they disappear. I have checked and double checked and then checked one more time my install.

Did it like i have done 5 other servers. Need help.

btw this is on Napf overpoch version shown above. 

Link to comment
Share on other sites

Hello,

I've installed this today and it seems to work but I have some problems. If I try to spawn a bike without the needed items I get the message: "Missing 1 more of ". With the items I still get the same message.

When I try to deploy a Motocykle it shows nothing. It doesn't show me what items I need or which are missing. Not even this message "Missing 1 more of ".

The only thing I can deploy is the Mozzie. This can show me what items are missing and I can deploy a Mozzie when I have the needed items. But I can't pack it. 

8b9dc0c996.png

//////////////////////////////////////////////////////////////////////////////////////////
//                                     Configuration                                    //
//////////////////////////////////////////////////////////////////////////////////////////

// Do you want vehicles to be sold at traders?
EVDSellVehicles = false;

//////////////////////////////////////////////////////////////////////////////////////////
//                                   Common Functions                                   //
//////////////////////////////////////////////////////////////////////////////////////////
EVDGetMaterials = {
	private ["_type","_materials"];

	_type = _this select 0;

	switch (_type) do {
		case "MMT_Civ":		{ _materials = [["ItemCompass", 1], ["ItemWatch", 1]]; };
		case "TT650_Civ":	{ _materials = [["PartEngine", 1], ["PartWheel", 1]]; };
		case "CSJ_GyroC":	{ _materials = [["PartVRotor", 1], ["PartGeneric", 1]]; };
	};

	_materials;
};
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...