OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Mandoble on 13 Jun 2008, 22:19:00

Title: Mando Hitching (ACCEPTED)
Post by: Mandoble on 13 Jun 2008, 22:19:00
(http://www.ofpec.com/ed_depot/the_files/ArmAResources/images/mando_hitch.jpg)

Allows players to hitch vehicles using choppers. Please do no mirror this resource yet.

You may allow hitching for individual choppers or chopper classes. The pilot has a hud with info about closest detected vehicle and its relative position, so you can proceed with accurate hitching operations without even using external views.

Changes in 1.5:

    * Now you can toggle mando hitch hud ON/OFF from action menu.
    * Now you can set hud scale and X and Y offsets, so you can place it anywhere in the screen.
    * Hud now display cargo type also in text.
    * Destroyed vehicles can be hitched too.
    * You can define heavy choppers and heavy cargo. Heavy cargo classes can be hitched only by heavy transport classes.
    * HUD colours adjusted to be more readable in any condition.

Changes in 1.4:

    * You now can hitch and drop static weapons and static objects.
    * You can hitch only civilian (empty) or your own side cargo.

Changes in 1.3:

    * You now can hitch and drop ammo boxes.
    * Hitching hud does not interfere any more with Mando Missile huds.
    * You now can hitch and drop airplanes, if fast enough they'll keep flying.
    * Cargo will not try to go underground even if you fly really low.
    * Now you can transport cargo as long as the cargo is not destroyed, so you can transport severely damaged vehicles too.
    * Minimum altitude to drop a cargo may be overridden with new mando_hitch_no_check_for_drop global variable.
    * Hitching hud is gone if you are not hitching any cargo and there is no potential cargo nearby.



Get Mando Hitching v1.5 (http://www.ofpec.com/ed_depot/index.php?action=details&id=552&page=0) (Please do not mirror this resource yet).
Title: Re: Mando Hitching (ACCEPTED)
Post by: GaReb on 14 Jun 2008, 02:20:40
Just tried the demo mission and I didn't see any HUD nor any command in the action menu.  ???
Title: Re: Mando Hitching (ACCEPTED)
Post by: myke13021 on 14 Jun 2008, 14:50:19
Excellent work as usual, Mandoble.

One thing though, is it possible to hide the HUD when not in range for hitching a vehicle and only pops up when near? I guess it is since the vehicle icon also pops up on the lower left corner.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Jun 2008, 15:02:34
Do you mean to hide the background? Yes, just as the other controls _mark, _line, etc.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Manzilla on 14 Jun 2008, 15:30:55
Just tried the demo mission and I didn't see any HUD nor any command in the action menu.  ???

GaReb,

What mods/AddOns are you using? I think SLX or one of the others replaces the classname in the mission.sqm file.


First, check the Init file. The line should read:

[["UH60MG"]]execVM"mando_hitch\mando_add_hitch.sqf";

Now, check the mission.sqm file and look for:

items=1;
            class Item0
            {
               position[]={2548.634766,13.860000,2457.171631};
               azimut=260.000000;
               special="FLY";
               id=0;
               side="WEST";
               vehicle="AAMOW008";
               player="PLAYER COMMANDER";
               leader=1;
               skill=0.600000;
               text="heli1";

Look for the line I highlighted in red, "vehicle="AAMOW008"". It should have the class name from the Init file line above, in the example mission, UH60MG. Now if there is something other then, vehicle="UH60MG" , in the mission.sqm line; just take whatever name does appear and exchange "UH60MG" in the Init file to this other name.

Hopefully this helps you out.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 14 Jun 2008, 16:25:54
Hey Mandoble, just had a play with the hitching m8, having a slight issue with the HUD resource staying in the choppers.  Erm i have the Mando Missile systems active on the choppers aswell, although the hitch HUD appears; it goes once the missile systems are activated.  Could the MMA resource be replacing the HUD when activated?  Or have i just screwed something  :-[.  Just so you know the hitch system itself works fine, just he HUD isnt displayed.

Not a major issue really, as i seem to be the only one who bothers to do logistical stuff :)

Just thought i'd let you know....

Cheers.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vengeance on 14 Jun 2008, 18:39:38
I have found in the demo that if you replace the line:

[["UH60MG"]]execVM"mando_hitch\mando_add_hitch.sqf";

with

[heli1]execVM"mando_hitch\mando_add_hitch.sqf";   

It works fine, i am not using SLX mods and do not know why first line does not show HUD.

I have also found the HUD does not appear after vehicle respawns. I am using Mando Missle as well.


Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Jun 2008, 19:26:52
You can use a particular vehicle or a vehicle type array, yep. If you use a particular vehicle (heli1), you will need to execute the script again after respawn, if you use an array of vehicle types, it should keep working after vehicle respawn too.

EDIT: First line would show HUD if your chopper class is "UH60MG". To make sure, put hint format["%1", typeOf this] in the init field of your chopper (not that it is case sensitive so UH60MG is different than uh60mg).
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vengeance on 14 Jun 2008, 19:58:02
Ok working now with this change:

[["UH60mg"]]execVM"mando_hitch\mando_add_hitch.sqf";

Works great on all Helos.  Very Nice work Mandoble!
Title: Re: Mando Hitching (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 14 Jun 2008, 23:00:50
Sorry Vegeance, did u say you can get the HUD working along side the mando missile systems? i.e map in top corner.
If so could you just go through how with me? I have tried the above to no avail.

Cheers...
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Jun 2008, 23:10:19
Quite easy, open mando_add_hitch.sqf and change all the cutRsc by titleRsc
Mando missile hud uses cutRsc too, hence the interference.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 15 Jun 2008, 00:01:52
Thankyou m8, all sorted...

EDIT: Sorry bit of a premature sorted there lol....   HUD appears ok, but then does not dissapear once you get out of the chopper.

Getting there though  :D
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 15 Jun 2008, 00:27:11
Do you mean that you lose your hud if you get out of the chopper and get in again?
Title: Re: Mando Hitching (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 15 Jun 2008, 01:39:46
No sorry, When you get out of the chopper, whatever is displayed on the Hitch HUD at the time stays on the screen.  So you have the green cross etc. while running round.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 15 Jun 2008, 01:52:03
Ah, sorry, change also the cutText there by titleText
Title: Re: Mando Hitching (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 15 Jun 2008, 02:31:12
Sorted the HUD issue, cheers bud.

Could you tell me, where abouts is the value is that changes the height in which the cargo vehicle is placed below the helicopter?
While testing the HUD on my dedicated server, i've had the helicopter seemingly blow up in mid air, it seems this happens when i decrease altitude quickly; the helicopter then hits the cargo below and explodes.  Just wonder if placing the cargo a bit further below the helicopter might solve this issue.

Thanks for all the support again m8.  I will keep testing various situations and report back if i find anything else of interest.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 15 Jun 2008, 02:36:17
That is the single argument of mando_hitch.sqf
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 18 Jun 2008, 00:18:33
New v1.3 available, list of changes:
    * You now can hitch and drop ammo boxes.
    * Hitching hud does not interfere any more with Mando Missile huds.
    * You now can hitch and drop airplanes, if fast enough they'll keep flying.
    * Cargo will not try to go underground even if you fly really low.
    * Now you can transport cargo as long as the cargo is not destroyed, so you can transport severely damaged vehicles too.
    * Minimum altitude to drop a cargo may be overridden with new mando_hitch_no_check_for_drop global variable.
    * Hitching hud is gone if you are not hitching any cargo and there is no potential cargo nearby.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Manzilla on 18 Jun 2008, 01:18:03
Holy new features Mandoble. :good: The speed at which you work is astonishing.

Is it possible to hitch artillery pieces and the like? My apologies for the post if the answer is yes. I couldn't seem to get that part to cooperate. :dunno:
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 18 Jun 2008, 01:56:04
Add your arty class to the array of hitchable classes like in the example:
mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox"];
Title: Re: Mando Hitching (ACCEPTED)
Post by: Manzilla on 18 Jun 2008, 02:00:41
Oh yeah of course. Christ I should have been able to figure that out. Thank you.
Title: Re: Mando Hitching (ACCEPTED)
Post by: andres1135 on 19 Jun 2008, 14:16:47
Hi,
At the beginning it did not work but I found the error in line 4 of init.sqf:
[["UH60MG""]]execVM"mando_hitch\mando_add_hitch.sqf";
it should be :
[["UH60MG"]]execVM"mando_hitch\mando_add_hitch.sqf";
and it works now.
Very good work, well done, I may add.
 :clap: :clap: :clap:
Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 19 Jun 2008, 17:40:22
Hey Mando great script man.. I already had alot of good times with it.

But i tryed to get it implemented in warfare but i couden't.
When i start up my edited version of warfare i crash to desktop with the following error: RCStitle class allready used.
I tryed a cople things to get that away, but with no succes.
I don't wanne change to manny things cause i know i will screw it up than.
Is there a way to fix this.. Allready thanks for you'r time man..
Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 19 Jun 2008, 19:45:38
Okay i got the script working atleast the hitching..

I red another reply from you that you sayd to somebody to change evrything from cutRsc to titleRcs and the titletext to cutText..
Now i changed evrything back cause i'm not using mando missiles in this warfare map, after that the hitching script works but....
When i enter the chopper i get a ERROR:  RESOURCE TITLE MANDO_HITCH_HUD not found.

Example what i did in the warfare description.ext :

Quote
titleParam2 = $STRWFPARAM2LABEL;
valuesParam2[] = {CAPTUREALLTOWNS,MIN30,MIN60,MIN90,SCORE100,SCORE200,SCORE500,SCORE1000};
textsParam2[] = {"Capture All Towns",$STRWFPARAM2B,$STRWFPARAM2C,$STRWFPARAM2D,$STRWFPARAM2E,$STRWFPARAM2F,$STRWFPARAM2G,$STRWFPARAM2H};
defValueParam2 = CAPTUREALLTOWNS;

#include "Scripts\TeamStatusDialog\TeamStatusDialog.hpp"

Class RscCut
{
#include "mando_hitch\mando_hitch_titles.h"
};
//Gui related
#define DEFAULTFONT                  "Bitstream"

#define GUIUNDEFINED               -1
#define GUILEFT                     0
#define GUIRIGHT                  1
#define GUICENTER                  2
#define GUITILEBAR                  32
#define GUIFRAME                  64
#define GUIDEFAULTTILEBAR            GUITILEBAR + GUICENTER
#define GUIIMAGE                  48
#define GUIIMAGEASPECTRATIO            48 + 0x800
#define GUISTYLEHUD                  128

#define GUITEXT                     0



And where i changed TitleRsc to CutRsc:

Quote
_action = -1;
while _condition do
{
   if (_types) then
   {
      if (((typeOf vehicle player) in _helis) && (driver vehicle player == player)) then
      {
         if (_action == -1) then
         {
            _action = (vehicle player) addAction ["Pick Up", "mando_hitch\mando_pickup.sqf"];
            _veh = vehicle player;
         };

         if (isNull mando_hitch_hud) then
         {
            CutRsc["mando_hitch_hud", "PLAIN"];
         };
      }
      else
      {
         if (_action != -1) then
         {
            _veh removeAction _action;
            _action = -1;
         };

         if (!isNull mando_hitch_hud) then
         {
            CutText["", "PLAIN"];
         };
      };
   }
   else
   {
      if (driver _heli == player) then
      {
         if (isNull mando_hitch_hud) then
         {
            CutRsc["mando_hitch_hud", "PLAIN"];
         };
      }
      else
      {
         if (!isNull mando_hitch_hud) then
         {
            CutText["", "PLAIN"];
         };
      };
   };

But obvious it isn't that simple..
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 19 Jun 2008, 19:48:00
You must have that hitching resource hud defined in description.ext (RscTitles section):
Code: [Select]
class RscTitles
{
#include "mando_hitch\mando_hitch_titles.h"
};

EDIT;
RscTitles resources are usable by both, cutRsc and titleRsc command, there is not any class named "Class RscCut"
Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 19 Jun 2008, 20:45:08
YEah i just made that cutRsc class up to see if that wood work.. LOL

But now i tryed like you said to put it under that other Class RscTitle what was allready in that warfare discreption.ext.
But that gives me still the error resource title MANDO_HITCH_HUD not found.  (i also tryed it to put you'r code at the bottom of that warfare code.. with the same result.)

P.S. I changed evrything back to defaulth mando scripts first

Code: [Select]
class RscTitles   

{
#include "mando_hitch\mando_hitch_titles.h"
};
{
titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject};

//--- Karel 03/03/2008
class WF_Splash
{
idd = -1;
movingEnable = true;
duration = 10;
fadein = 0;
name = "Warfare Splash";
class controls
{
class BackgroundWindow:GuiText
{
colorBackground[] = {0,0,0,1};
text = "";
x = -1;
y = 0;
w = 3;
h = 1;
};
class InfoBackground:GuiImage
{
idc = -1;
x=-1.0;
y=+0.375;
w=+3.0;
h=+0.24;
text = "\ca\ui\data\marker_brush_horizontal_ca.paa";
colorText[] = {1,1,1,0.1};
colorBackground[]={0,0,0,0};
};
class warfarelogo: GUIImageAspectRatio
{
x = 0.1;
y = 0.2;
w = 0.8;
h = 0.5;
text = "Images\warfare_logo_matt.paa";
colorText[] = {1,1,1,1};
};
class cti: GUIText
{
style = GUICENTER;
x = 0.-5;
y = 0.45;
w = 1.0;
h = 0.2;
sizeEx = 0.06;
text = "$STRWFSPLASH";
colorText[] = {1,1,1,1};
};


class copyright: GUIText
{
style = GUICENTER;
x = 0.0;
y = 0.95;
w = 1.0;
h = 0.02;
sizeEx = 0.025;
text = "$STRWFCOPYRIGHT";
colorText[] = {1,1,1,0.5};
};
};
};

class UseObject:DefaultMenu
{
duration = 15000;
name = "UseObject";

And here the description.ext file from warfare how i changed: http://84.105.226.181/armafiles/Description.ext (http://84.105.226.181/armafiles/Description.ext)

Sorry for you'r time man.. but i still learning all this.. If you don't have the time to help me so be it  :D
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 19 Jun 2008, 21:07:04
Code: [Select]
class RscTitles   
{
#include "mando_hitch\mando_hitch_titles.h"
// LINE REMOVED, not needed at all titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject};
// Below goes the rest of your warfare RscTitles section
class WF_Splash
{
...
...
...
};

Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 19 Jun 2008, 21:45:27
EDITED: Hmm i did exactly what you said and deleted that line but now i crash to desktop with the error description.ext, line 1572: '.': '{' encountered insead of '='

Code: [Select]
class RscTitles

{
#include "mando_hitch\mando_hitch_titles.h"

{

//--- Karel 03/03/2008
class WF_Splash
{
Title: Re: Mando Hitching (ACCEPTED)
Post by: loki72 on 19 Jun 2008, 23:04:10
what about the rest of the code?

Code: [Select]
...
...
...
};

 :)

you gotta have }; to end the section
Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 19 Jun 2008, 23:10:08
the total part of that code looks like this now.. how i try'd to pmlement it like i tought mando ment it to be..

Code: [Select]
class RscTitles   

{
#include "mando_hitch\mando_hitch_titles.h"

{

//--- Karel 03/03/2008
class WF_Splash
{
idd = -1;
movingEnable = true;
duration = 10;
fadein = 0;
name = "Warfare Splash";
class controls
{
class BackgroundWindow:GuiText
{
colorBackground[] = {0,0,0,1};
text = "";
x = -1;
y = 0;
w = 3;
h = 1;
};
class InfoBackground:GuiImage
{
idc = -1;
x=-1.0;
y=+0.375;
w=+3.0;
h=+0.24;
text = "\ca\ui\data\marker_brush_horizontal_ca.paa";
colorText[] = {1,1,1,0.1};
colorBackground[]={0,0,0,0};
};
class warfarelogo: GUIImageAspectRatio
{
x = 0.1;
y = 0.2;
w = 0.8;
h = 0.5;
text = "Images\warfare_logo_matt.paa";
colorText[] = {1,1,1,1};
};
class cti: GUIText
{
style = GUICENTER;
x = 0.-5;
y = 0.45;
w = 1.0;
h = 0.2;
sizeEx = 0.06;
text = "$STRWFSPLASH";
colorText[] = {1,1,1,1};
};


class copyright: GUIText
{
style = GUICENTER;
x = 0.0;
y = 0.95;
w = 1.0;
h = 0.02;
sizeEx = 0.025;
text = "$STRWFCOPYRIGHT";
colorText[] = {1,1,1,0.5};
};
};
};



Title: Re: Mando Hitching (ACCEPTED)
Post by: loki72 on 19 Jun 2008, 23:15:24
if i counted right... it needs 2 more }'s at the end.

Code: [Select]
class copyright: GUIText
{
style = GUICENTER;
x = 0.0;
y = 0.95;
w = 1.0;
h = 0.02;
sizeEx = 0.025;
text = "$STRWFCOPYRIGHT";
colorText[] = {1,1,1,0.5};
};
};
};
    };
};

Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 19 Jun 2008, 23:47:36
I did it like you sayd but i still get the error '{' encounterd instead of =

Working on this allready for 6 our's with no result.. So i call it a quit.. Gonna wait till somebody els makes a warfare with mando script so i can get that description file from him...

Thanks for all the great help guy's...

P.S. if i do the code like below the hitching will work but than you get the error mando_hitch_hud not found... If you did the code like in the previous reply's you wood get the error  '{' encountered instead of '='


Code: [Select]
class RscTitles
{
#include "mando_hitch\mando_hitch_titles.h"
};

{
titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject};

//--- Karel 03/03/2008
class WF_Splash
{
idd = -1;
movingEnable = true;
duration = 10;
fadein = 0;
name = "Warfare Splash";
class controls
{
class BackgroundWindow:GuiText
{
colorBackground[] = {0,0,0,1};
text = "";
x = -1;
y = 0;
w = 3;
h = 1;
};
class InfoBackground:GuiImage
{
idc = -1;
x=-1.0;
y=+0.375;
w=+3.0;
h=+0.24;
text = "\ca\ui\data\marker_brush_horizontal_ca.paa";
colorText[] = {1,1,1,0.1};
colorBackground[]={0,0,0,0};
};
class warfarelogo: GUIImageAspectRatio
{
x = 0.1;
y = 0.2;
w = 0.8;
h = 0.5;
text = "Images\warfare_logo_matt.paa";
colorText[] = {1,1,1,1};
};
class cti: GUIText
{
style = GUICENTER;
x = 0.-5;
y = 0.45;
w = 1.0;
h = 0.2;
sizeEx = 0.06;
text = "$STRWFSPLASH";
colorText[] = {1,1,1,1};
};


class copyright: GUIText
{
style = GUICENTER;
x = 0.0;
y = 0.95;
w = 1.0;
h = 0.02;
sizeEx = 0.025;
text = "$STRWFCOPYRIGHT";
colorText[] = {1,1,1,0.5};
};
};
};
};
Title: Re: Mando Hitching (ACCEPTED)
Post by: Planck on 20 Jun 2008, 04:38:25
 :blink:

Code: [Select]
class RscTitles   
{
    #include "mando_hitch\mando_hitch_titles.h"
    titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject};

    //--- Karel 03/03/2008
    class WF_Splash
    {
        idd = -1;
        movingEnable = true;
        duration = 10;
        ......
        ......
        ......


Presumably


Planck
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 20 Jun 2008, 07:38:02
---->>>>titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject};
In your titles section only WF_Splash is defined, CampCaptureProgress and the rest seem to be missing there.
You may remove the titles[] array or, if not removed, include the hitch.h below that titles line and add to that line mando_hitch_hud. But the main problem I see there is that some mission title classes are missing.

Code: [Select]
class RscTitles
{
titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject,mando_hitch_hud};

#include "mando_hitch\mando_hitch_titles.h"

//--- Karel 03/03/2008
class WF_Splash
{
idd = -1;
movingEnable = true;
duration = 10;
fadein = 0;
name = "Warfare Splash";
class controls
{
class BackgroundWindow:GuiText
{
colorBackground[] = {0,0,0,1};
text = "";
x = -1;
y = 0;
w = 3;
h = 1;
};
class InfoBackground:GuiImage
{
idc = -1;
x=-1.0;
y=+0.375;
w=+3.0;
h=+0.24;
text = "\ca\ui\data\marker_brush_horizontal_ca.paa";
colorText[] = {1,1,1,0.1};
colorBackground[]={0,0,0,0};
};
class warfarelogo: GUIImageAspectRatio
{
x = 0.1;
y = 0.2;
w = 0.8;
h = 0.5;
text = "Images\warfare_logo_matt.paa";
colorText[] = {1,1,1,1};
};
class cti: GUIText
{
style = GUICENTER;
x = 0.-5;
y = 0.45;
w = 1.0;
h = 0.2;
sizeEx = 0.06;
text = "$STRWFSPLASH";
colorText[] = {1,1,1,1};
};


class copyright: GUIText
{
style = GUICENTER;
x = 0.0;
y = 0.95;
w = 1.0;
h = 0.02;
sizeEx = 0.025;
text = "$STRWFCOPYRIGHT";
colorText[] = {1,1,1,0.5};
};
};
};
};
Title: Re: Mando Hitching (ACCEPTED)
Post by: eggbeast on 20 Jun 2008, 15:40:39
Hi guys

Great work on the script Mando, it's much betterthan the winch script I was using from Hohei Evolution.  Very graceful coding dude.

I'm having a small problem trialing it and porting it into my (private) evolution mods - the truck or w/e is hitched goes on TOP of the chopper (checked with hind, chinook, MH6 and blackhawk) causing a spectacular and immediate plane crash....

(http://i162.photobucket.com/albums/t247/eggbeast/hindhitchproblem.gif)

(http://i162.photobucket.com/albums/t247/eggbeast/hindtankprob.gif)

I'm guessing this line sets the height of the cargo?
_fheight = _height + (0 min (_unit modelToWorld [0,-1,-_height] select 2));

any idea why it might set it above the chopper, when the chopper is at height 13 or 14?

Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 20 Jun 2008, 16:45:27
Might be related to the model coordinates origin of your chopper. Try with more distance between cargo and chopper:
Code: [Select]
[15]execVM"mando_hitch\mando_hitch.sqf"
If might be also related to the existance of surfaces in your chopper that might be considered "ground" by ArmA. For example, if you place an ammo box directly below your chopper, 5m lower, while your chopper might be 300m above ground, its altitude is 5m (a terrible ArmA bug, yep).
Title: Re: Mando Hitching (ACCEPTED)
Post by: eggbeast on 20 Jun 2008, 16:59:38
is the [15] meaningful here?
I left my [] empty in that line cos I didn't know what it was meant to be... could that be the problem?

[EDIT] That was it... I think you may want to add that in the readme file lol.  The [15] is the rope length!! so if you set it on [] then you crash as above lol.

CHEERS - great script - been trying to edit the old winch.sqf to ass "ship" classfor ages so thanks a huge bunch!

 :D
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 20 Jun 2008, 17:29:58
Extracted from the readme  :blink:

There are two main scripts: mando_hitch.sqf and mando_add_hitch.sqf.

mando_hitch.sqf:
Execute this script only once before executing any mando_add_hitch.sqf. Make sure it is executed everywhere, server and clients.
It has a single parameter which is the distance between cargo an chopper while transporting the cargo.
Title: Re: Mando Hitching (ACCEPTED)
Post by: winchesterdelta on 20 Jun 2008, 17:59:55
Hey Mando thanks for the great help you'r script works now with warfare.....

Appreciate you'r help man.... and offcourse the help from all the others also...  :clap:
Title: Re: Mando Hitching (ACCEPTED)
Post by: GaReb on 22 Jun 2008, 04:52:10
Im having trouble getting the hud to come up.  I have tried changing the UH60MG to heli1 in the ini.sqf with no effect.  When the mission starts I get no errors at all nor any hud directing me to a hitchable load.  Any idea why this is happening? In the ini file this string is in it [12]execVM"mando_hitch\mando_hitch.sqf"; Should the 12 be replaced by the UH60MG?
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 22 Jun 2008, 09:30:41
Code: [Select]
[heli1]execVM"mando_hitch\mando_add_hitch.sqf";
Title: Re: Mando Hitching (ACCEPTED)
Post by: GaReb on 22 Jun 2008, 20:18:54
Code: [Select]
[heli1]execVM"mando_hitch\mando_add_hitch.sqf";

Thanks Mandoble that did it...I was leaving in the double [[ ]] instead of just single.  Works great now.  Thank you
Title: Re: Mando Hitching (ACCEPTED)
Post by: eggbeast on 22 Jun 2008, 21:25:57
hi again

yeah the readme says theres one variable but it doesnt say it is the figure in the brackets - some mission makers (like me) might not realise thats what u mean...

I've imported the script into my versions of Evo RED, Evo Blue and Evo Brit and we have been testing it out.  Some feedback that may be helpful in development:

1. Sometimes the "pick up" and "drop" actions remain added in an empty heli, so that they accumulate and are not removed when exiting the chopper/ function.  This means you get 3 "pick up"'s at once and they cease to work properly.
2. Sometimes the "pick up" doesn't execute at all, although the "drop" becomes added (addaction), so it thinks you have cargo but the cargo is back where it started....  when you select "drop" you get the "pickup" option again
3. the M119 and D30's are not hitchable?  They are in the old winch script I used (as landvehicle) but not with hitch??
4. Lastly, but MOST importantly, the circle within which you can hitch a target seems way too small: compared to the old winch script where you can winch into and out of battle with panache this is a nightmare to use... perhaps because the pickup is so temperamental - ittakes me like 10 passes to grab something and i have to check its really there lol.  very frustrating.  perhaps a variable for pickup zone or else just a bigger one would be better?

cheers for working on this, i hope we can use it in time.  meantime i'm reverting to winch, but i don't want to...

thanks again man
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 22 Jun 2008, 21:39:40
1. Sometimes the "pick up" and "drop" actions remain added in an empty heli, so that they accumulate and are not removed when exiting the chopper/ function.  This means you get 3 "pick up"'s at once and they cease to work properly.

In which situations?
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 23 Jun 2008, 00:05:49
New version available.
Changes in 1.4:

    * You now can hitch and drop static weapons and static objects.
    * You can hitch only civilian (empty) or your own side cargo.
Title: Re: Mando Hitching (ACCEPTED)
Post by: eggbeast on 23 Jun 2008, 01:07:51
hard to say exactly - i think it's after a pilot picks up a "phantom" object and doesn't select drop but exits the chopper with it still "picked up".  then when i get in i have the drop object action and the pick up object action in my menu.  so i choose drop (cos i haven't got anything and i want to be sure that i can pick up) and so i now have 2 pick ups in the menu.  do this a few times over a few days in evo and you have a stack of pick ups.

also tonight i hitched a vulcan and it moved slightly on the ground but otherwise stayed put.  then i flew away to see what would happen.  about 1000m away all of a sudden i heard the vulcan coming and thought "ok, it's caught up" but it actually came right up into the heli (i was at 70m) and blew me up.  this could have been due to the server being busy - 6 of us vs a lot of bots and quite a heated battle going on...

also in the original winch script it used a text HUD to say "winch UAZ_AGS30" whereas with your HUD you have to look at the picture, the circle and the pickup command all at the same time, but with winch you just fly up to your target press middle button and fly off knowing what you have... so tho yours is more realistic, it's hard to use in evo combat.

the winch code they used to make the name of the vehicle pop up on screen was
               _cargo = _nObject;
               actioncargo = _uh60 addAction [format ["Winch %1", typeOf _cargo], "scripts\winch_start.sqf",


Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 23 Jun 2008, 08:36:09
Thanks for the feedback, I'll investicate that case where you pick up something and exit the chopper before dropping it.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 24 Jun 2008, 18:03:16
Brilliant Mandoble, static weapons movement is great, combined with combat engineers that can build bunkers, some nice little firebases can be setup.

Not sure if your planning on adding any more features to this, the only real addition i could see improving it, is the ability to assign different helicopters to pick up certain types of cargo.  i.e  say a chinook could lift a stryker or m113 where as the blackhawk could not lift something heavier than a hummer.

Just an idea for you, if its possible at all...but fantastic effort on this as always.

Cheers.

Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 24 Jun 2008, 22:35:35
Of course this is possible and will be added as soon as I be able to recreate the problem with multiple actions described by eggbeast.
Title: Re: Mando Hitching (ACCEPTED)
Post by: eggbeast on 25 Jun 2008, 01:15:35
the variation lifting would work well with say chinooks and mi17s lifting tanks, boats and choppers and blackhawks and hinds lifting all other vehicles, M119, etc and little birds lifting ammo boxes, AGS30 and MG positions.

the pickup zone definitely needs expanding though.  Even if you didn't want to expand it, if you could make it a variable or else explain how to make it bigger I'd really appreciate it cos I like your script but it's hard to use in-game atm.

keep up the great work dude - happy to spend hours testing it for you...

Title: Only 2 classnames allowed in array??
Post by: Gen.Iceman on 03 Jul 2008, 12:11:21
Hello Manoble, Ive integrated Mando hitching into a warfare map.I have 4 diffrent types of helos that i want hitching other vehicles.

code:
Quote
[["UH60MG","UH60","MI17_MG","RHS_MI24D"]]execVM"mando_hitch\mando_add_hitch.sqf";

only the UH60MG & The Hind have the hitch action. . .is there a limit on classnames in the array?

Regards,
  =SEALZ= Gen.Iceman
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 03 Jul 2008, 12:46:55
No, there is no limit, just check that the classes are writen correctly checking also upper and lower case characters.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Gen.Iceman on 09 Jul 2008, 02:54:08
Problem Solved!! Thanks Manoble  :good:


Regards,
   Iceman
Title: Re: Mando Hitching (ACCEPTED)
Post by: eggbeast on 16 Jul 2008, 14:09:33
here is a real hitch for you!
http://news.bbc.co.uk/1/hi/uk/7493547.stm

how's it going on the final version?

Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 16 Jul 2008, 15:09:06
Still trying to recreate the problem of multiple actions with no luck  :blink:
Did you experience that problem more times?
Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 02 Aug 2008, 16:18:32
Hi,

I've got a problem with the script?
All is working great in mission editor(Thx Mandoble)  :clap:

But when i upload the mission to our dedi server the server hangs and doesnt respond?
I did read about something to do with clent/server side?

But alas im lost!
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 02 Aug 2008, 16:24:19
This is being run in multiple servers without any problem and there should not be any issue related to client/server.
How are you executing it and from where?
Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 02 Aug 2008, 16:41:35
My bad! *hits self with beer can* its ok its an empty one!  :good:

For some daft reason i was adding heli2,heli3 etc for more choppers when all i had to do was add the class names to the other line !

I assume that was causing the conflict!

Thanks working a treat!  :D
Title: Re: Mando Hitching (ACCEPTED)
Post by: Rawhide on 06 Aug 2008, 16:39:33
Hi Mando,
thank you for a well-working script.

I have a Q: is it possible for this script to hoist a completely destroyed vehicle/aircraft?
Tried it, locally and on dedicated. Same results: You get the burned out vehicle on the HUD, and you're able to start hoist it. After approx. one second or less, it get hooked off. Any solution would be much appreciated.


Best regards,
Rawhide
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 06 Aug 2008, 16:42:54
Open mando_hitch.sqf, look for
Code: [Select]
               if (!alive _cargo) then
               {
                  _continue = false;
               };

And remove it.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Rawhide on 06 Aug 2008, 16:48:51
Impressingly fast  :)
Thank you very much.


-Rawhide
Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 07 Aug 2008, 17:02:43
Heya Mando,

I have all working in editor,but when testing on our server everything seems working,hud/action menu etc but it just wont pickup?
I mean action menu says it has cause it gives the option to drop cargo!

Any ideas?

Thanks
Title: Re: Mando Hitching (ACCEPTED)
Post by: CrazyAce on 08 Aug 2008, 07:03:03
I noticed that when in server I have to drop to the point where I'm nearly touching the object to hitch it, sometimes it takes a few trys to get it hitched.
Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 08 Aug 2008, 22:21:23
Tried that Crazy.

I even get the icon of eg a landie to say i have it and the option to drop it but its just not there?  :confused:
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 08 Aug 2008, 23:22:52
Which thing are you trying to pickup? a vehicle? empty? any respawn script for empty or abandoned vehicle is working in the background? How are you executing the script itself?
Title: Re: Mando Hitching (ACCEPTED)
Post by: ViperMaul on 08 Aug 2008, 23:41:16
We have used it in MP on a dedi at http://www.arma-tow.com for the last 5 weeks. That has never happened to me. I have always had Hitch work in picking anything I configured it to pick up.

It makes me wonder how you are initializing the scripts.
Perhaps you can post some code or attach your mission.
Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 09 Aug 2008, 07:35:39
From my init.sqf :-

mando_hitch_no_check_for_drop = true;
mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox", "StaticWeapon"];
[12]execVM"mando_hitch\mando_hitch.sqf";
[["UH60MG","UH60","RAF_Chin47"]]execVM"mando_hitch\mando_add_hitch.sqf";
//[heli1]execVM"mando_hitch\mando_add_hitch.sqf";
Title: Re: Mando Hitching (ACCEPTED)
Post by: ViperMaul on 09 Aug 2008, 16:39:31
Look ok at first glance.
But I find problems faster through testing.

So two things:

Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 10 Aug 2008, 11:28:25
Hi,i've attached the mission
Like i sed it works fine in the editor and when i host a game!
Trying to pick up Landies,ammo boxes and artillery pieces!
Thanks Again  :)
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 10 Aug 2008, 11:56:26
You can try the following. Just create a simple mission with your hitching setup and some vehicles to hitch and try it in your server, if ths work, then might be something else is interfering the script. Anyway, expect a new hitching version today or tomorrow (Viper, with actions to activate/deactivate the hitching hud  :P ).
Title: Re: Mando Hitching (ACCEPTED)
Post by: Kremator on 10 Aug 2008, 12:02:31
Sweet !  I'm updating my Sabotage mission so much taht my clan mates think I'm a scripting guru (NOT !)  I'm just putting in your stuff Mandoble !

[TAO] Kremator
Title: Re: Mando Hitching (ACCEPTED)
Post by: CrazyAce on 10 Aug 2008, 13:16:55
... with actions to activate/deactivate the hitching hud  :P ).

That would be awsome, it can sometimes get in the way when ya don't want it at that moment.
Title: Re: Mando Hitching (ACCEPTED)
Post by: ViperMaul on 11 Aug 2008, 11:00:20
Hi,i've attached the mission
Like i sed it works fine in the editor and when i host a game!
Trying to pick up Landies,ammo boxes and artillery pieces!
Thanks Again  :)

I had to spend about 30 minutes removing all the addons that I didn't have to really work with your mission.
But after doing that. I have reproduced the problem. Doesn't work on the Dedi but it does work on local MP-Server.
Fascinating...

I will investigate for ya.

My natural first thought was you had some addons conflicting. But I don't have any in my test. In order to report a bug to Mandoble he likes me having a clean Arma (no addons/no mods).

My next thought was that I see you have Norrin's revive script initializing before the Mando Hitch. I don't see anything wrong with this at first glance but, it is the process of testing to comment it out. Guess what it worked.

So trying to find an order of initialization that works for ya. Or at least figure out what in Norrin's Revive Init settings conflicts.

bbl

Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 11 Aug 2008, 11:12:44
Thanks very much for your time and effort Viper  :good: :good:
Title: Re: Mando Hitching (ACCEPTED)
Post by: ViperMaul on 11 Aug 2008, 11:39:29
Ah it makes sense now.

You must be using a very old version of Norrin's revive script. He's got great stuff but you need to keep up-to-date.
Norrin's fixed a bug a long time ago that also is effecting all scripts running server side.

As you know init.sqf is run on both the server and the client.
Therefore in your script the following line is run.

Code: [Select]
waitUntil {player == player};
On the client side this is fine. But on a true dedicated server side there is no player so this will never be true. Any code below this line will not be run on the server and the Mando Hitch appears to require running on both the server not just the client.

Again Norrin and I talked about this last year and he fixed this already. Go get the latest version of Norrin's revive. 
Revive AI-disabled version x_1.49j (http://www.armaholic.com/page.php?id=2931)

In the mean time if you want your Mando Hitch to work immediately move the appropriate init lines any where before this offending line shown above.


Mandoble,
Very much looking forward to the actions to activate/deactivate the hitching hud. Bravo!!
I hope this feature also finds its way into your other HUDs where it makes sense!!
Title: Re: Mando Hitching (ACCEPTED)
Post by: ckclaw on 11 Aug 2008, 12:23:03
Many Thanks  :good:

For some reason im having troubles with Norrin's latest Revive Script?
That was the reason for keeping the older version,as it does exactly what we needed.

Maybe i need to take another look.

Thanks again!  :)
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 11 Aug 2008, 12:26:05
Yes Viper, the hud position has been changed too  ;)
Title: Re: Mando Hitching (ACCEPTED)
Post by: ViperMaul on 11 Aug 2008, 18:42:43
ckclaw,

Then change
Code: [Select]
waitUntil {player == player};to this
Code: [Select]
if ( (!isServer) && (player != player) ) then
{
    waitUntil {player == player};
    waitUntil {time > 10};
};

And you should be golden.
As you can see this checks to see if this is the server and acts appropriately.

Mandoble, excellent!!! Thanks my friend. If I can call you a friend. You know me. I am always obsolete.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 12 Aug 2008, 00:06:59
New v1.5 available:

   * Now you can toggle mando hitch hud ON/OFF from action menu.
   * Now you can set hud scale and X and Y offsets, so you can place it anywhere in the screen.
   * Hud now display cargo type also in text.
   * Destroyed vehicles can be hitched too.
   * You can define heavy choppers and heavy cargo. Heavy cargo classes can be hitched only by heavy transport classes.
   * HUD colours adjusted to be more readable in any condition.
Title: Re: Mando Hitching (ACCEPTED)
Post by: monty67t on 12 Aug 2008, 01:23:21
The correct term for this is slingloading, not hitching.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Manzilla on 12 Aug 2008, 01:41:02
That's true, when a sling load is incorporated. Hitching is correct as well. It depends upon the action though if you want to get down to semantics. In all reality, neither of those are the technical term for moving something suspended from a helo. It's just a name of a script pack, not a DoD manual.

I think it's a good, catchy name though. Hopefully Mando is happy with it as well. :scratch:

 :good:  :D
Title: Re: Mando Hitching (ACCEPTED)
Post by: monty67t on 12 Aug 2008, 03:22:43
In all reality, slingloading is the term for it. Despite what you may have found on google or whatever other places you wannabes search. It was my job for seven years and the only thing anyone ever called it was slingloading. Now I know you must be some super duper military expert who knows everything about every piece of equipment, every tactic, and so on, but I assure you, if you ask anyone who has ever been involved in U.S. Army Aviation, they will tell you that it's called slingloading, period.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Planck on 12 Aug 2008, 05:20:34
Ok, we have established that the term is at the very least valid for the US Armed Forces even if not for all Armed forces globally.

Now, can we get back on topic please?


Planck
Title: Re: Mando Hitching (ACCEPTED)
Post by: Kremator on 12 Aug 2008, 09:02:59
Good job Mandoble !

[TAO] Kremator
Title: Re: Mando Hitching (ACCEPTED)
Post by: ViperMaul on 12 Aug 2008, 10:31:11
Bravo Mandoble!!
Thanks a lot for listening to the players needs & desires.
Well done!!
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vengeance on 13 Aug 2008, 06:42:20
Mandoble,

When I try to Hitch a Wreck, it starts to pick it up, then drops it but says I still have it?  Hit Drop nothing happens just resets?  Do I have to configure types of Wrecks to pick up?

Vengeance
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vigilante on 13 Aug 2008, 07:51:10
Hi, perfect script, works flawlessy. Nice to tow/hitch/slingshot or whatever your arty pieces around. Works nicely with CPS Arty AI M119. They will then shoot from their new position. I love the new functionality in your scripts. Nice to have heavies difference now.

I would suggest, you also include a "winch" script to really hitch your units. You know one of these things to pull soldiers into your hovering chopper. And maybe a rappel and fastrope function.... :D

I now im getting greedy...

thanks mandoble for pushing your scripts even further!
peace!
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 13 Aug 2008, 09:33:50
Do I have to configure types of Wrecks to pick up?

Probably yes.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vengeance on 13 Aug 2008, 20:59:36
Ok, how would I do that?  I don't see an array given to define it in the readme file?  The object is already defined in the:

mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox", "StaticWeapon"];

Thanks
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 13 Aug 2008, 21:11:39
Which wreck are you trying to pick up?
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vigilante on 13 Aug 2008, 21:33:48
You can also get the direct class of the object themselfes, by looking into the config.cpp of the wanted objects addon. With it you can add any addon you want without other of the same main class i.e. instead of "Tank" or such its then "VTE_M113" without the possibility to pickup any other of the "Tank" class vehicles.

I used for example the CPS Arty M119 addon to be hitchable in my NAM mission and now you can/must relocate your guns if you want to fire where you couldnt before relocating them. The AI sits silently in their guns while hitched. No Probs to get them firing again. Totally awesome things possible with it.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 13 Aug 2008, 22:10:26
In fact you may put "Man" into the hitchable classes and then terrify your team mates with a low level flight for free  :P
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vengeance on 13 Aug 2008, 23:50:28
Which wreck are you trying to pick up?

I put another AH6 in your example mission and then destroyed it. Then tried to pick it up with UH60, in another case I was trying to pickup an AddOn Mig15. 
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Aug 2008, 00:13:16
Forgot to remove 3 lines, open mando_hitch.sqf, look for
Code: [Select]
               if (!alive _cargo) then
               {
                  _continue = false;
               };

And remove that block. This way you will be able to transport fully destroyed vehicles, ships, planes and choppers.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vengeance on 14 Aug 2008, 17:33:57
All is good now, working perfect!  Well done. :)
Title: Re: Mando Hitching (ACCEPTED)
Post by: Vigilante on 14 Aug 2008, 21:45:44
Actually there is this SF retrieval system, where the squad alternately links into the rope and then the chopper takes them out.
.. nah, i could never explain properly  ::)
http://en.wikipedia.org/wiki/Special_Patrol_Insertion/Extraction
http://www.videosoftheworld.com/vow/view.asp?country=honduras&vid=G-6701446600396319478

For single soldiers already DONE! :D

(Im bad at explaining today...)

 :cool2:
Title: Re: Mando Hitching (ACCEPTED)
Post by: Ironman on 16 Aug 2008, 08:59:52
Init.sqs
Code: [Select]
mando_hitch_no_check_for_drop = true;
;mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox", "StaticWeapon"];
mando_hitch_types = ["M113Ambul","UralRepair","UralRefuel","UralReammo","Stryker_ICV_M2","ReammoBox"];
mando_hitch_types_heavy = ["Air", "StaticWeapon"];
mando_hitch_heavies = ["UH60MG"];
[12]execVM"mando_hitch\mando_hitch.sqf";
[["UH60MG", "MH6"]]execVM"mando_hitch\mando_add_hitch.sqf";
;[heli1]execVM"mando_hitch\mando_add_hitch.sqf";

Problem:
The UH60MG can pick up ammo boxes and these trucks.
The UH60MG will not pick up Strykers/M113 Ambul.

The stryker and M113 Ambul are on a raised platform using "setpos". This is the only thing I can think of that is causing the problem. Also, the raised platform is in the middle of the ocean. I have tried setting the value of "[12]" to 7 but that does not do anything to help...???

-----------------

Even though it doesn't seem it.... thank you very much for your hard work Madoble

------**EDIT**---------
I tried using "LandVehicles" and that does not work either.

So now I put these two vehicle on land and they are able to be picked up.... So I guess trying to pick them up on a raised platform is the problem. If you set the m113 Ambul/Stryker on a platform lower than 2.5 it will pick it up...
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 22 Aug 2008, 12:05:55
There is a global var named mando_hitch_min_height set it to the minimum height of the cargo to be hitched.
Check mando_pickup.sqf
Code: [Select]
      if ((getPos _unit select 2) < mando_hitch_min_height) then
Title: Re: Mando Hitching (ACCEPTED)
Post by: martin_m on 14 Sep 2008, 00:51:22
Hi,

I'm fairly new to ARMA and have just got the hitching script(?).

Is there any way using the hitching script to make AI helicopters pick up equipment? My idea would be to have a helicopter carrying troops with a second helicopter hitching an artillery gun.

Any ideas greatly appreciated.

Thanks.

Martin

Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Sep 2008, 11:02:50
Hi Martin,
mando hitching is designed to be used by players, wait for Mando Bombs and Air Support 1.6, the AI will be able to transport static objects (artillery too) to the desired destination position.
Title: Re: Mando Hitching (ACCEPTED)
Post by: martin_m on 14 Sep 2008, 15:40:46
Thanks Mandoble!

 :) here's hoping v1.6 is soon!!!
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Sep 2008, 17:13:56
1.6 is out, check mando_bombs_no_mapdlg.Intro and its init.sqf.
Title: Re: Mando Hitching (ACCEPTED)
Post by: martin_m on 14 Sep 2008, 18:38:04
This will sound like a really stupid question but can I not order the AI helicopters to pick things up from the air support console? I've just tried the demo mission you pointed out and I've got no air support console option.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 14 Sep 2008, 19:07:44
Correct, that mission is to setup air support missions without the console. If you want to use the console, then try mando_bombs_armedrec.Sara, mando_bombs_mapdlg_mma.Sara or mando_bombs_mapdlg.Sara. For any questions about mando air support use this thread. (http://www.ofpec.com/forum/index.php?topic=31017.0)

What you can now do is to order AI to transport static weapons to the indicated destination, not to pickup weapons that are already placed on the map. In mando_bombs_no_mapdlg.Intro AI will bring you a static gun, a M113 and reinforcements, but all these units are spawned (not map placed).
Title: Re: Mando Hitching (ACCEPTED)
Post by: TenaciousB on 20 Sep 2008, 21:32:59
Hello all,

How do I activate the mando hitch on both client and server sides? I was testing it out in my local server with a couple other people and they did not have the mando hitch options.  Only I did.?

Thanks,
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 21 Sep 2008, 00:25:27
Run mando_hitch.sqf and mando_add_hitch.sqf from the init.sqf for everyone.
Title: Re: Mando Hitching (ACCEPTED)
Post by: TenaciousB on 21 Sep 2008, 01:20:34
I put it in my version of evo, here's the beginning of the init.sqs file
I'm not sure what to do, I'm a bit of a newb

debug=false;
setterraingrid 50;
setViewDistance 1200;
//Statics
this exec "markerGPS.sqs";
this exec "PlayerMarker.sqs";
//if(debug) exitWith {};

mando_hitch_no_check_for_drop = true;
//mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox", "StaticWeapon"];
mando_hitch_types = ["Car","Motorcycle", "ship"];
mando_hitch_types_heavy = ["Tank","Air", "StaticWeapon"];
mando_hitch_heavies = ["UH60MG", "MAP_CH47D"];
[12]execVM"mando_hitch\mando_hitch.sqf";
[["UH60MG", "MAP_CH47D"]]execVM"mando_hitch\mando_add_hitch.sqf";
//[heli1]execVM"mando_hitch\mando_add_hitch.sqf";

rank1 = 0;
rank2 = 0;
rank3 = 0;
rank4 = 0;
rank5 = 0;
rank6 = 1;
onmission=false;
sobj1=false;
sobj2=false;
Title: Re: Mando Hitching (ACCEPTED)
Post by: Manzilla on 21 Sep 2008, 03:27:55
I always put my Mando Hitch stuff first above that stuff. Not sure if that makes a difference though.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 21 Sep 2008, 06:41:51
TenaciousB, is that init.sqs or init.sqf?
Title: Re: Mando Hitching (ACCEPTED)
Post by: TenaciousB on 21 Sep 2008, 09:12:07
I'm sorry that's the init.sqf file,

thanks for takin the time to help me out  :D
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 21 Sep 2008, 09:58:39
Ok, the code you have there works in a dedi. Now I dont know if Evo has some other scripts that reset or remove actions client/side.
You may try mando_hitching.Intro in your dedi to make sure the basis works for you.
Title: Re: Mando Hitching (ACCEPTED)
Post by: (EAGLE)SicSRT-4 on 23 Sep 2008, 12:07:19
Hey Mando,

  This addon is absolutely fantastic! I just can't seem to get it to work when i try to specify a whole vehicle array.

From my init.sqf

Code: [Select]
mando_hitch_no_check_for_drop = true;
mando_hitch_types = ["LandVehicle", "Ship", "ReammoBox", "StaticWeapon"];
[12]execVM"mando_hitch\mando_hitch.sqf";
//[["UH60MG","UH60"]]execVM"mando_hitch\mando_add_hitch.sqf";
[heli1]execVM"mando_hitch\mando_add_hitch.sqf";

If i leave it like that and use the [heli1], it'll work fine for the one helicopter i have designated as "heli1" in the mission.sqm. But if i switch it around and try to use the [UH60MG,..etc] it won't work at all. No HUD, no option in the action menu, nothing.

From my mission.sqm

Code: [Select]
class Item12
{
position[]={9666.865234,139.994995,10079.077148};
id=12;
side="EMPTY";
vehicle="UH60MG";
lock="UNLOCKED";
skill=0.600000;
text="uh60a";
};
class Item13
{
position[]={9635.601563,139.994995,10080.491211};
id=13;
side="EMPTY";
vehicle="UH60";
lock="UNLOCKED";
skill=0.600000;
text="uh60b";
};

Even though the 'vehicle=...' matches the entry in the init.sqf...i went ahead and tried all different capitalization options. That didn't help me either. I've been playing around with this for a good 5 hours now and have read every post in this thread about a dozen times...lol. I've tried every possible combination that i can think of, i just can't seem to find a solution.  :dunno: I'm probably just missing something very stupid, but am too blind to see it myself. I'd appreciate any help/insight you can give.

Thanks for all your hard work and taking the time to help us  :D

~Sic
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 23 Sep 2008, 17:39:49
Are you using the latest version?
Title: Re: Mando Hitching (ACCEPTED)
Post by: (EAGLE)SicSRT-4 on 23 Sep 2008, 17:51:19
If v1.5 is the latest, then yes  :)
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 23 Sep 2008, 18:01:26
This is the init.sqf of 1.5, and it works fine for me (it is using classes array instead of chopper names):
Code: [Select]
mando_hitch_no_check_for_drop = true;
//mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox", "StaticWeapon"];
mando_hitch_types = ["Car","Motorcycle", "ship", "ReammoBox"];
mando_hitch_types_heavy = ["Tank","Air", "StaticWeapon"];
mando_hitch_heavies = ["UH60MG"];
[12]execVM"mando_hitch\mando_hitch.sqf";
[["UH60MG", "AH6"]]execVM"mando_hitch\mando_add_hitch.sqf";
Title: Re: Mando Hitching (ACCEPTED)
Post by: (EAGLE)SicSRT-4 on 23 Sep 2008, 18:55:00
Hmmm, ok. If i just copy and paste that in, the AH6's work fine. The UH60MG doesn't though, even tried just "UH60" (i have one of each in the mission) and neither one worked. So at least the problem is narrowed down to the blackhawks, now i just gotta figure out why  :confused:

:EDIT: Well, looks like it wanted "UH60mg" instead of "UH60MG". I could've sworn i tried that a dozen different times...lol. The UH60's still aren't working so i just replaced them with the MG variant. Makes no difference to me  :P

Thanks again for the help Mando, keep up the awesome work!

~Sic
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 23 Sep 2008, 20:58:59
You might have some addon or mod there renaming the basline classes. If you have doubts about a class name, just place the following into its init field:
Code: [Select]
hint typeOf this
Title: Re: Mando Hitching (ACCEPTED)
Post by: USM-CPT.Dyson on 24 Sep 2008, 07:50:28
Stats of UH-60-

Capacity: 2,640 lb of cargo internally, including 14 troops or 6 stretchers, or 8,000 lb (UH-60A) or 9,000 lb (UH-60L) of cargo externally

I don't think any BIS helicopter other then the UH-60 and the Mi-17 even has the ability to lift anything.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Luke on 26 Sep 2008, 03:06:46
Probably because there isn't many BIS helos in ArmA.  :D  :P

Luke
Title: Re: Mando Hitching (ACCEPTED)
Post by: USM-CPT.Dyson on 26 Sep 2008, 07:16:37
Haha well that would mean BIS would have to make stuff!!! lol  :whistle:
Title: Re: Mando Hitching (ACCEPTED)
Post by: myke13021 on 16 Oct 2008, 18:14:57
While including the mando_hitch into my CH-47/UH-60 Cargolifter addon (once again thanks, Mandoble), i saw that there is no countercheck if a subclass of a class set in mando_hitch_types is defined as heavy cargo.

As an example:
You define baseclass "Car" as mando_hitch_types
You define class "StrykerBase" as mando_hitch_types_heavy

The problem is, StrykerBase inherits from class Car, so even as the Stryker are defined as heavy cargo, also choppers not defined by mando_hitch_heavies can lift it because it inherits of class "Car".

To get around this behaviour, i've edited 2 scripts:
mando_pickup.sqf & mando_add_hitch.sqf

Extract from orignal mando_pickup.sqf:
Code: [Select]
..
...
if (typeOf _unit in mando_hitch_heavies) then
{
   _units = nearestObjects [[getPos _unit select 0, getPos _unit select 1, 0], mando_hitch_types+ mando_hitch_types_heavy, 5];
}
else
{
   _units = nearestObjects [[getPos _unit select 0, getPos _unit select 1, 0], mando_hitch_types, 5];
};
_units = _units - [_unit];
...
..

Now what i've added to this code:
Code: [Select]
..
...
if (typeOf _unit in mando_hitch_heavies) then {
_units = nearestObjects [[getPos _unit select 0, getPos _unit select 1, 0], mando_hitch_types+ mando_hitch_types_heavy, 5];
} else {
_units = nearestObjects [[getPos _unit select 0, getPos _unit select 1, 0], mando_hitch_types, 5];
{
_temp_vehicle = _x;
{
if ((typeof _temp_vehicle) iskindof _x) then {
_units = _units - [_temp_vehicle];
};
}
foreach mando_hitch_types_heavy;
}
foreach _units;
};
...
..
As you see it does a countercheck if a class also inherits from a class defined in the mando_hitch_types_heavy and then discards this vehicle.

The same piece of code is in the mando_add_hitch.sqf and also has to be altered to make this work.
Maybe you want to include this part in your original script also but i guess to remember to have read you don't plan any updates on this.

However, maybe this helps someone else who got the same "problem" with this excellent hitching script.


Oh, and btw Mandoble, of course i've changed all variable names to stay compatible with your mando_hitch.
Title: Re: Mando Hitching (ACCEPTED)
Post by: gunterlund on 22 Aug 2009, 22:00:58
Mando have you converted this to Arma2 yet. I ran it in MP on a server and I get a serialization error on the HUD. thanks for the update.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 23 Aug 2009, 10:33:19
Yes, it is converted. But before releasing I would like to do some tests with the new command for attaching objects to vehicles. This might be an interesting option for the hitching script.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Luke on 17 Sep 2009, 01:45:48
I think it is just a permanent sort of setpos modeltoworld thing.

Luke
Title: Re: Mando Hitching (ACCEPTED)
Post by: ZachHox on 25 Sep 2009, 01:17:10
Hi,


I have a problem or bug in arma warfare with the mando hitching. Its like when I scroll down after I picked something up, I can keep scrolling and have the option a 1000 times, only "pickup" and "toggle mando hub".

How can I fix this?

Quote
This is my init.sqf file content:
TitleRsc["WF_Splash","PLAIN",1];
setterraingrid 50;
setviewdistance 1200;

mando_hitch_no_check_for_drop = true;
mando_hitch_types = ["LandVehicle","ship", "Air", "ReammoBox", "StaticWeapon"];
[12]execVM"mando_hitch\mando_hitch.sqf";
[["Mi17_MG","RHS_Mi24D", "MAP_CH47D_Cargo", "modem_NH90", "MAP_AH64_CO"]]execVM"mando_hitch\mando_add_hitch.sqf";
[["UH60MG"]]execVM"mando_hitch\mando_add_hitch.sqf";
//[heli1]execVM"mando_hitch\mando_add_hitch.sqf";

For arma 1 btw.

This is pretty much whats in my description file:
Quote
class RscTitles
{
   titles[] = {WF_Splash,CampCaptureProgress,TownCaptureProgress,EndOfGameStats,UseObject,mando_hitch_hud};

   #include "mando_hitch\mando_hitch_titles.h"
   
   //--- Karel 03/03/2008
   class WF_Splash
   {
      idd = -1;
      movingEnable = true;
      duration = 5;
      fadein = 0;
      name = "Warfare Splash";
      class controls
      {
         class BackgroundWindow:GuiText
         {
            colorBackground[] = {0,0,0,1};
            text = "";
            x = -1;
            y = 0;
            w = 3;
            h = 1;
         };
         class InfoBackground:GuiImage
         {
            idc = -1;
            x=-1.0;
            y=+0.375;
            w=+3.0;
            h=+0.24;
            text = "\ca\ui\data\marker_brush_horizontal_ca.paa";
            colorText[] = {1,1,1,0.1};
            colorBackground[]={0,0,0,0};
         };
         class warfarelogo: GUIImageAspectRatio
         {
            x = 0.1;
            y = 0.2;
            w = 0.8;
            h = 0.5;
            text = "\Warfare\Images\warfare_logo_brown.paa";
            colorText[] = {1,1,1,1};
         };
         class cti: GUIText
         {
            style = GUICENTER;
            x = 0.0;
            y = 0.45;
            w = 1.0;
            h = 0.2;
            sizeEx = 0.06;
            text = "$STRWFSPLASH";
            colorText[] = {1,1,1,1};
         };


         class copyright: GUIText
         {
            style = GUICENTER;
            x = 0.0;
            y = 0.95;
            w = 1.0;
            h = 0.02;
            sizeEx = 0.025;
            text = "$STRWFCOPYRIGHT";
            colorText[] = {1,1,1,0.5};

         };
      };
   };


Course there is more but I'll leave it at that.
Well I guess thats it...


I like the 1.5 version very much, the hub toggle on hub on the side is very nice. Before it was near impossible to use teh chopper itself if I were to use it for anything else.


Good addon script. :P
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 25 Sep 2009, 15:08:55
This code seems ok, might be ArmA warfare does something with menu actions? If tested outside of warfare does it work well?
Title: Re: Mando Hitching (ACCEPTED)
Post by: ZachHox on 25 Sep 2009, 17:01:59
Well it seems to be only with the v1.5 version. I overwrite it with the newer one and has those problems.

Any ideas?
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 25 Sep 2009, 18:59:04
I mean, does it happen with Warfare only, is the included demo mission having the same "infinite" actions problem?
Title: Re: Mando Hitching (ACCEPTED)
Post by: ZachHox on 25 Sep 2009, 20:31:18
oh, that is a mission actually only you have to create it in a pbo. :) Why didn't you tell me. :P

Yes, the demo mission works fine.
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 25 Sep 2009, 22:19:33
If the demo works fine, then there is something in that Warfare mission that messes up with the menu actions. I think something about that was posted long time ago in the BI Forums (warfare threads).
Title: Re: Mando Hitching (ACCEPTED)
Post by: Lonewolf on 27 Sep 2009, 11:00:01
Hi Mandoble,

I was put the hitch scripts on my A2 mission, it didn't works and show pop up screen before mission start. "Variabl 'mando_hitch_hud' does not suport serialization and should not be stored in the mission namespace". I don't know what is that mean? When I get in the chooper the action manu has show "pick up" and "toggle hod" but it still can do anything. So can you help me out? Thanks!

Lonewolf
Title: Re: Mando Hitching (ACCEPTED)
Post by: Mandoble on 27 Sep 2009, 15:11:23
The hitching script is not yet converted for A2.
Title: Re: Mando Hitching (ACCEPTED)
Post by: ZachHox on 02 Nov 2009, 01:47:03
He' Mandoble,

Do you know how I can get the mando hitch to work in Domination? I tried several combinations but ended in error and it didn't work.

I tried adding this to the ResTitles:
Code: [Select]
#include "mando_hitch\mando_hitch_titles.h"
To:
Code: [Select]
titles[] =
{
"mando_hitch_hud"
};
class mando_hitch_hud
{
  idd = 100;
  movingEnable =  1;
  duration     =  10000;
  fadein       =  0;
  fadeout      =  0;
  name = "mando_hitch_hud";

  onLoad = "mando_hitch_hud = (_this select 0)";

  class controls
  {
  class MANDOHITCH_BACKGROUND
  {
     idc = 101;
             type = 0;
             colorText[] = {1, 1, 1, 1};
             font = "Bitstream";
     colorBackground[] = {0, 0, 1, 0.2};
     text = ;
     style = 128;
     sizeEx = 0.015;
     x = 0.3;
     y = 0.3;
     w = 0.4;
     h = 0.4;
  };


  class MANDOHITCH_MARK
  {
     idc = 102;
             type = 0;
             style = 48;
             font = "Bitstream";
             sizeEx = 0.04;
             colorBackground[] = {0, 0, 0, 0};
             colorText[] = {0, 0.5, 0, 0.5};
             text = "mando_hitch\mando_hitch_circle.paa";
             x = 0.5-0.03/2;
             y = 0.5-0.05/2;
             w = 0.04;
             h = 0.05;
          };

  class MANDOHITCH_CROSS
  {
     idc = 103;
             type = 0;
             style = 48;
             font = "Bitstream";
             sizeEx = 0.04;
             colorBackground[] = {0, 0, 0, 0};
             colorText[] = {0, 1, 0, 0.5};
             text = "mando_hitch\mando_hitch_cross.paa";
             x = 0.5-0.02;
             y = 0.5-0.025;
             w = 0.04;
             h = 0.05;
          };

  class MANDOHITCH_ICON
  {
     idc = 104;
             type = 0;
             style = 48;
             font = "Bitstream";
             sizeEx = 0.04;
             colorBackground[] = {0, 0, 0, 0};
             colorText[] = {1, 1, 1, 1};
             text = "";
             x = 0.3;
             y = 0.7 - 0.05;
             w = 0.05;
             h = 0.05;
          };

  class MANDOHITCH_TEXT
  {
     idc = 105;
             type = 0;
     style = 2;
       x = 0.5 - 0.15;
       y = 0.7 - 0.05;
       w = 0.3;
       h = 0.03;
             colorText[] = {0, 1, 0, 1};
             colorBackground[] = {0, 0, 0, 0};
             font = "Bitstream";
             sizeEx = 0.02;
     text = "";
          };

          class MANDOHITCH_LINE
          {
             idc = 106;
             type = 0;
             style = 176;
             x = 0.5;
             y = 0.5;
             w = 0.1;
             h = 0.1;
             colorText[] = {0, 1, 0, 1};
             colorBackground[] = {1, 0, 0, 1};
             font = "Bitstream";
             sizeEx = 0.02;
             text = "";
          };
   };
};


Default Domination has this in the description.ext:
Code: [Select]
class RscTitles
{

#ifdef __MANDO__
#include "mando_missiles\mando_missiletitles.h"
#endif
#include "x_dlg\IntroText.hpp"

};

Course I put the other stuff in the init.sqf file and copied the mando_hitch directory neatly, as I did with several evos and it worked fine. Warfare too actually.


Thanks.
Title: Re: Mando Hitching (ACCEPTED)
Post by: MaveryQ on 07 Nov 2009, 14:22:37
Hi,

Where can i download "Mando Hitching" ... I would like to try it with ARMA2 ???