Home   Help Search Login Register  

Author Topic: Mando Hitching (ACCEPTED)  (Read 39905 times)

0 Members and 2 Guests are viewing this topic.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Mando Hitching (ACCEPTED)
« Reply #120 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.

Offline gunterlund

  • Members
  • *
  • I'm a llama!
Re: Mando Hitching (ACCEPTED)
« Reply #121 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.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Hitching (ACCEPTED)
« Reply #122 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.

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: Mando Hitching (ACCEPTED)
« Reply #123 on: 17 Sep 2009, 01:45:48 »
I think it is just a permanent sort of setpos modeltoworld thing.

Luke
Pesky Human!!
Wort Wort Wort.

Offline ZachHox

  • Members
  • *
Re: Mando Hitching (ACCEPTED)
« Reply #124 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

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Hitching (ACCEPTED)
« Reply #125 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?

Offline ZachHox

  • Members
  • *
Re: Mando Hitching (ACCEPTED)
« Reply #126 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?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Hitching (ACCEPTED)
« Reply #127 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?

Offline ZachHox

  • Members
  • *
Re: Mando Hitching (ACCEPTED)
« Reply #128 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.
« Last Edit: 25 Sep 2009, 20:42:17 by ZachHox »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Hitching (ACCEPTED)
« Reply #129 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).

Offline Lonewolf

  • Members
  • *
Re: Mando Hitching (ACCEPTED)
« Reply #130 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
« Last Edit: 27 Sep 2009, 11:10:37 by Lonewolf »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Hitching (ACCEPTED)
« Reply #131 on: 27 Sep 2009, 15:11:23 »
The hitching script is not yet converted for A2.

Offline ZachHox

  • Members
  • *
Re: Mando Hitching (ACCEPTED)
« Reply #132 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.

Offline MaveryQ

  • Members
  • *
Re: Mando Hitching (ACCEPTED)
« Reply #133 on: 07 Nov 2009, 14:22:37 »
Hi,

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