Extra Vehicle Actions Addon

Re: Extra Vehicle Actions Addon

« Reply #60 posted: Aug 05, 2015, 10:31 PM »
Hmm, strange, i remembered micoverys vactions worked "out of the box".... but he does locking in a way that i dont really understand.

Could you post your mission .pbo and i can take look tomorrow

*Edit*

Im not sure, but it could be that the AntiHack blocks BIS_fnc_MP (and i cannot look right now) so if you look in va_functions around line 291
Code: [Select]
[[_vehicle, _state] , "A3W_fnc_lock", true, false, true] call BIS_fnc_MP;
try do
Code: [Select]
[[_vehicle, _state] , "A3W_fnc_lock", true, false, true] call A3W_fnc_MP;
if that works, you might want to either change that in all "vaction" files or make an exempt in filterExecAttempt.sqf

If its blocked you should see it in your servers .rpt i believe also note that if its blocked Rev. blocked it for a reason.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Extra Vehicle Actions Addon

« Reply #61 posted: Aug 05, 2015, 11:19 PM »
I have been using Micovery's script for months now. Not having any problems what so ever.

Re: Extra Vehicle Actions Addon

« Reply #62 posted: Aug 05, 2015, 11:25 PM »
That fixed it !!

[[_vehicle, _state] , "A3W_fnc_lock", true, false, true] call A3W_fnc_MP;

Worked! Awesome!! Thank you!!! 

/happy dance

** Edit **
is it by default, that Helis and Jets / Planes can't be locked? Or is there an adjustment. I see something on line 507 for me it states:

def(_target);
  _target = _objects select 0;
 
  if (not(_target isKindOf "LandVehicle")) exitWith {nil};
 
  _target

only thing I found that points to a vehicle type.

Re: Extra Vehicle Actions Addon

« Reply #63 posted: Aug 06, 2015, 01:16 AM »
I have been using Micovery's script for months now. Not having any problems what so ever.
Yeah, i agree, i believe it worked fine for me to without any alterations.

AJ, it looks like you might be using an older variant of "vaction" (sorry Rev. for posting this) try vactions from this branch https://github.com/micovery/ArmA3_Wasteland.Altis/tree/Development_main_addons/addons/vactions
https://github.com/micovery/ArmA3_Wasteland.Altis/tree/Development_main_addons
and i think you wont have to change BIS_fnc_MP either (again not entirerly sure).

The function you are looking at (around line 507) should look like this but there are more changes so take the whole folder then i think all owned vehicles will be lockable, keep in mind that there is also a setting in config.cfg for possible limits.
Code: [Select]
va_outside_target = {
  ARGVX3(0,_player,objNull);
  ARGVX3(1,_distance,0);
  if (!isPlayer _player) exitWith {};
 

  def(_target);
  if (surfaceIsWater (position _player)) then {
   //line intersect does not work well when vehicle is in water
    _target = cursorTarget;
  }
  else {
    def(_pos1);
    def(_pos2);
    _pos1 = (eyePos player);
    _pos2 = ([_pos1, cameraDirDist(_distance)] call vector_add);
_objects = (lineIntersectsWith [_pos1,_pos2,objNull,objNull,true]);
if (!isARRAY(_objects) || {count _objects == 0}) exitWith {};
_target = _objects select 0;
  };

  if (isNil "_target") exitWith {};

  if (({_target isKindOf _x } count ["Helicopter", "Plane", "Ship_F", "Car", "Motorcycle", "Tank"]) == 0) exitWith {};
 
  _target
};

But i usually change this
Code: [Select]
  if (({_target isKindOf _x } count ["Helicopter", "Plane", "Ship_F", "Car", "Motorcycle", "Tank"]) == 0) exitWith {};
to this
Code: [Select]
  if (({_target isKindOf _x } count ["LandVehicle", "Ship", "Air"]) == 0) exitWith {};
But thats just some OCD tick i have  :) and as i said the original line should cover it but i think some of those classes are from ArmA 2.

BTW, if you haven't located it you should really find your .rpt files thye tell you most of what is wrong
On your client they are usually in
C:\Users\whatever your username is\AppData\Local\Arma 3
On the server the the location might vary, i start my server with "-profiles=C:\Arma3Server\Wasteland\SNAFU"
and they end up in that folder.

its also a good thing to start your game with "Show Script Errors" now they changed this i think so now you tick a box in the launcher under parmameters -> advanced -> author (someone please correct me if im wrong and you still add it as a startup parameter.

Also remember when you test shit, if you are launching the mission on your client "locality" becomes an issue, so stuff that works when you run your mission on the client might not work on a dedicated server. also if you make changes to certain files like description.ext and files loaded from that you need to get back to the mission selection before you go in again, but many things you only need to go out to the "Roles" selection. If you are messing with A3W in particular you might want to change "#define DEBUG false" to true in the main init.sqf as everything that uses mf_compile will not be "compileFinaled"

Quote
// if in debug mode, the function will be dyncamically compiled every call.
// if not in debug mode, the function will be compileFinal'd

Hope you got thru that wall of text =)

Re: Extra Vehicle Actions Addon

« Reply #64 posted: Aug 06, 2015, 02:17 AM »
I have been running show script errors now for about a year. It has taught me a lot. But then again so does diving head first into code.

And I went to the first link for Github and things where out of date I would guess I was missing a few things. Going to test it. Seeing I have no player base I can restart at will and get all my testing / debugging out of the way.

Issue fully resolved!!! Thank you again guys!! Sorry can't say that enough :P


Thanks again! You guys are great!

Re: Extra Vehicle Actions Addon

« Reply #65 posted: Aug 06, 2015, 01:11 PM »
Np, and good to hear =)

Re: Extra Vehicle Actions Addon

« Reply #66 posted: Feb 17, 2016, 06:22 AM »
The vactions addon has been a great addition to Wasteland and has worked great (along with a break lock) right up through the 1.54 release but has stopped working in the 1.56 RC. Anyone else had this issue and know the fix?

Re: Extra Vehicle Actions Addon

« Reply #67 posted: Feb 17, 2016, 08:59 AM »
I have a feeling that it's because the method micovery used for detecting vehicles got screwed up. I'm thinking the new command "cursorObject" might be useful. I'll se if I can find the code and point you in the right direction when I get home from work. If you wanna look thru it yourself, look for the Section that contains "lineIntersects" and you'll see how he detects stuff.
  • Offline Mooney
  • First Blood
  • ***
  • Posts: 56

Re: Extra Vehicle Actions Addon

« Reply #68 posted: Feb 17, 2016, 02:51 PM »
I ran into issues with vactions and AgentRev fixed a couple things to help get it working again.

Do his fix: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/commit/88817df2ec63bdf56efbdefaf409c6d8b817bfb2

First add all the vactions files. For persistence:

In vLoad.sqf
Code: [Select]
// If vehicle is was locked before restart then restore lockstate and make it untowable/unliftable LouD
if (_veh getVariable "R3F_LOG_disabled") then
{
_veh lock 2;
}
else
{
_veh lock 1;
};

In fn_getVehicleProperties (the only real change)
Code: [Select]
// Save lockstate by AgentRev
_variables pushBack ["R3F_LOG_disabled", _veh getVariable ["R3F_LOG_disabled", false]];

_owner = _veh getVariable ["ownerUID", ""];


That should get you going again. It is important to delete ALL vehicles from the database before implementing this. It took me days to figure out what was wrong after I didn't and it broke everything.
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1083
  • ^_^;;

Re: Extra Vehicle Actions Addon

« Reply #69 posted: Feb 17, 2016, 05:51 PM »
I ran into issues with vactions and AgentRev fixed a couple things to help get it working again.

Do his fix: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/commit/88817df2ec63bdf56efbdefaf409c6d8b817bfb2

First add all the vactions files. For persistence:

In vLoad.sqf
Code: [Select]
// If vehicle is was locked before restart then restore lockstate and make it untowable/unliftable LouD
if (_veh getVariable "R3F_LOG_disabled") then
{
_veh lock 2;
}
else
{
_veh lock 1;
};

In fn_getVehicleProperties (the only real change)
Code: [Select]
// Save lockstate by AgentRev
_variables pushBack ["R3F_LOG_disabled", _veh getVariable ["R3F_LOG_disabled", false]];

_owner = _veh getVariable ["ownerUID", ""];


That should get you going again. It is important to delete ALL vehicles from the database before implementing this. It took me days to figure out what was wrong after I didn't and it broke everything.

I could be wrong ... but i don't think this has to do with the 1.56 issue ^^

- from the grassy knoll -

Re: Extra Vehicle Actions Addon

« Reply #70 posted: Feb 17, 2016, 07:02 PM »
I have a feeling that it's because the method micovery used for detecting vehicles got screwed up. I'm thinking the new command "cursorObject" might be useful. I'll se if I can find the code and point you in the right direction when I get home from work. If you wanna look thru it yourself, look for the Section that contains "lineIntersects" and you'll see how he detects stuff.

Brilliant! I changed the _target definition to cursorObject around line 510 of "va_functions.sqf" and all is well again. Many thanks!

Code: [Select]
/*  def(_target);
  if (surfaceIsWater (position _player)) then {
   //line intersect does not work well when vehicle is in water
    _target = cursorTarget;
  }
  else {
    def(_pos1);
    def(_pos2);
    _pos1 = (eyePos player);
    _pos2 = ([_pos1, cameraDirDist(_distance)] call vector_add);
_objects = (lineIntersectsWith [_pos1,_pos2,objNull,objNull,true]);
if (!isARRAY(_objects) || {count _objects == 0}) exitWith {};
_target = _objects select 0;
  };
*/

  def(_target);
    _target = cursorObject;

  if (isNil "_target") exitWith {};

  if (({_target isKindOf _x } count ["Helicopter", "Plane", "Ship_F", "Car", "Motorcycle", "Tank"]) == 0) exitWith {};
 
  _target
};

EDIT: Thanks also Mooney but I had already made all your suggested changes before firing up the 1.56RC and discovering the problem. With the change above, vactions is working again and there is no issues with the DB.
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1083
  • ^_^;;

Re: Extra Vehicle Actions Addon

« Reply #71 posted: Feb 18, 2016, 05:47 AM »
Nicely done - seems to work well Coyote Rogue! Just a side note here - this fix will NOT work on 1.54 as the cursorObject function came with 1.55.

I am really liking the new fonts they added to the UI, and they've done a great job at redoing the sounds :O





- from the grassy knoll -

Re: Extra Vehicle Actions Addon

« Reply #72 posted: Feb 19, 2016, 05:51 AM »
I agree - loving the new sounds - BOOM!!!
And the fix works for me too. For those complete novices like me - look at Coyote Rogue's post date Feb 17, 2016, 07:02 PM. Replace everything above the */ with everything below the */

LOL
  • Offline Magic
  • First Blood
  • ***
  • Posts: 92

Re: Extra Vehicle Actions Addon

« Reply #73 posted: Feb 19, 2016, 11:35 AM »
Fix is a goodun thanks!

I still have the issue that player owned vehicles spawn back in unlocked after restart. There were some fixes for this a while back but it seems to have stopped working again before this update. Could anyone point in the right direction for getting it ironed out please?  Thanks,

Re: Extra Vehicle Actions Addon

« Reply #74 posted: Feb 20, 2016, 10:59 AM »
One side effects of this fix is I can no longer dismantle mortars and GMS tripods. ANyone else have this too?