Home   Help Search Login Register  

Author Topic: Heli Hitching Script  (Read 7655 times)

0 Members and 2 Guests are viewing this topic.

Offline ricnunes

  • Members
  • *
Re: Heli Hitching Script
« Reply #15 on: 11 Jun 2008, 00:02:49 »
Hi Mandoble,

Unfortunally I don't have good news. The new script works ok when testing it while running the mission in the mission editor but once I run the mission in a dedicated server the script doesn't work! When hovering above a vehicle meant to be picked up and press the "pick up" option, I get the normal the "Drop cargo" but NO cargo (vehicle) is attached to the helo.
When I press the "Drop cargo" option, the "pick up cargo" option returns and if I try to pick up a vehicle (the same or another one) the same thing happens (no cargo is ever attached).

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #16 on: 11 Jun 2008, 00:23:29 »
How does look like your init.sqf?

EDIT:
I did check in a dedi server and the script works well, the only weird effect is that the cargo bounces a lot when it is not local to the chopper, I will try to find out why.
« Last Edit: 11 Jun 2008, 00:32:04 by Mandoble »

Offline ricnunes

  • Members
  • *
Re: Heli Hitching Script
« Reply #17 on: 11 Jun 2008, 00:41:29 »
My init.sqf looks like this:

/*
  INITIALISATION SCRIPT

******************************************************************************************************************************
Start init.sqf
*/

waitUntil{player == player};

//run script that creates all triggers required for the revive script   
[] execVM "POW_sqf\trigger_mkr.sqf";

sleep 0.5;

//Variables required for onConnect script and triggers
onConnect = true;
PublicVariable "onConnect";

//Initialise revive script
server execVM "revive_init.sqf";

CH1 addAction ["Pick Up", "mando_pickup.sqf"];
CH2 addAction ["Pick Up", "mando_pickup.sqf"];



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

The last 2 lines are the ones that call your script, where CH1 and CH2 are the names of the 2 helicopters in my mission which will be able to lift cargo.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #18 on: 11 Jun 2008, 00:49:57 »
You are missing the mando_hitch.sqf

Code: [Select]
/*
  INITIALISATION SCRIPT

******************************************************************************************************************************
Start init.sqf
*/
// Executed for everyone, including the server with or without player
[7]execVM"mando_hitch.sqf";

waitUntil{player == player};

//run script that creates all triggers required for the revive script   
[] execVM "POW_sqf\trigger_mkr.sqf";

sleep 0.5;

//Variables required for onConnect script and triggers
onConnect = true;
PublicVariable "onConnect";

//Initialise revive script
server execVM "revive_init.sqf";

CH1 addAction ["Pick Up", "mando_pickup.sqf"];
CH2 addAction ["Pick Up", "mando_pickup.sqf"];

Offline ricnunes

  • Members
  • *
Re: Heli Hitching Script
« Reply #19 on: 11 Jun 2008, 01:15:32 »
DAMM, I'm such an idiot! That was exactly the problem! How could I make such a naive mistake, sorry for this false alarm  :-[

But yes, I've notice the bouncing cargo problem.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #20 on: 11 Jun 2008, 22:57:05 »
Try this (this is getting interesting ;) )
« Last Edit: 13 Jun 2008, 22:23:24 by Mandoble »

Offline ricnunes

  • Members
  • *
Re: Heli Hitching Script
« Reply #21 on: 12 Jun 2008, 00:44:22 »
Hi mandoble,

Tested your most recent script and it worked very well and now the cargo bounces much less than before.

But I'm getting one problem, which is when I enter as pilot for the first time in the lifter helicopter I get the following error message:

"Resource title mando_hitch_hud not found"


Probably I did something wrong, but I can't find what...

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #22 on: 12 Jun 2008, 00:49:52 »
Now you need to modify also a bit of description.ext file, just check the example. You have a now HUD info about potential cargo nearest to you so you can aim, aproach and pick up cargo without using any external view.

Offline ricnunes

  • Members
  • *
Re: Heli Hitching Script
« Reply #23 on: 12 Jun 2008, 01:00:18 »
Well I added the lines in your description.ext file into mine. Don't have a clue of what should I add more or what I should modify. Actually my description.ext is the following:

class Header
{
  gameType = Coop;
  minPlayers = 1;
  maxPlayers = 28;
};

class RscTitles
{
#include "mando_hitch\mando_hitch_titles.h"
};


#include "EMSI_Data\EMSI_UAV_display.hpp"
#include "EMSI_Data\EMSI_UAV_console.hpp"
#include "EMSI_Data\EMSI_UAV_map.hpp"

onLoadMission = "Operation Sakah Freedom - Part1 - Insurgence";
OnLoadMissionTime = FALSE;

//description.ext settings for revive
respawn = "INSTANT";
respawndelay = 4;

#include "revive_sqf\dialogs\respawn_button_1.hpp"
#include "revive_sqf\dialogs\respawn_button_2.hpp"
#include "revive_sqf\dialogs\respawn_button_3.hpp"
#include "revive_sqf\dialogs\respawn_button_4.hpp"
#include "revive_sqf\dialogs\respawn_button_1b.hpp"
#include "revive_sqf\dialogs\respawn_button_2b.hpp"
#include "revive_sqf\dialogs\respawn_button_3b.hpp"
#include "revive_sqf\dialogs\respawn_button_4b.hpp"
#include "revive_sqf\dialogs\config.cpp"
#include "revive_sqf\dialogs\rev_cam_dialog.hpp"

// Include spectating script resource
#include "spect\spectating.hpp"

///////////////////////////////////////////////////////////////////////////////////////////
titleParam2 = "Number of Revives:";
valuesParam2[] = {1000,20,10,7,5};
defValueParam2 = 7;
textsParam2[] = {"Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"};
///////////////////////////////////////////////////////////////////////////////////////////

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #24 on: 12 Jun 2008, 01:22:12 »
This
Code: [Select]
#include "mando_hitch\mando_hitch_titles.h"included inside your RscTitles section is all you need for the hitching hud.

Offline ricnunes

  • Members
  • *
Re: Heli Hitching Script
« Reply #25 on: 12 Jun 2008, 02:43:10 »
Actually I did something simplier, I commented the lines regarding the "HUD code" and left only the essencial lift code. It's working very well now!

Again, thanks very much for your help! I certainly wouldn't have done it without your help.

Offline Shadow.D. ^BOB^

  • Members
  • *
Re: Heli Hitching Script
« Reply #26 on: 13 Jun 2008, 15:11:54 »
Yet more fantastic scripts  :D  Just replaced my current hitch system with this, works great.  Mandoble is there anyway to have the "Too high for cargo" and "Correct height" text on the hud, only appear once your on approach (have the cargo sighted in the hud), and not when your flying around normally?  ATM I've just taken the text out of the script, but fo people who have trouble judging height etc it'll be easier to have it in.

Also would it be possible to define what helicopters could lift?  i.e  not be able to lift an M1A1.  I see the script is called to the helicopter by enterin the vehicle name in the init file, could the script be added by vehicle class instead? to solve any respawn issues that might arise.

We ask so much of you i know, but rest assured we appreciate it all. Arma in general is lucky to have people like you in the community.
Cheers...

P.S. Appologies if there are any words with letters missing, too many coffee's spilt on the keyboard are taking their toll :)
« Last Edit: 13 Jun 2008, 15:14:29 by Shadow.D. ^BOB^ »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #27 on: 13 Jun 2008, 15:20:32 »
Yes, the texts can be shown only when a potential cargo is detected.
Yes, I may add an array of potential cargo types, so you can only hitch these types.
About having the hitching option by type and not by unit name, yes, it is possible, but risky. I mean, lets say you have 20 UH60MG in your mission, are all of them going to be able to hitch vehicles?

Offline Shadow.D. ^BOB^

  • Members
  • *
Re: Heli Hitching Script
« Reply #28 on: 13 Jun 2008, 16:39:17 »
True, i guess it would be up to the mission maker to make only a couple available.  I suppose it all depends on the setup and type of mission, for those who only want select vehicles the name initialisation could be used, then the vehicle type for other situations.  If it is possible to have the two different methods i mean.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Heli Hitching Script
« Reply #29 on: 13 Jun 2008, 22:24:36 »
well Shadow, everything is now here ;)

Hitching choppers by type or name, array of hitchable vehicles, etc.